gedaiu / fluent-asserts

DLang fluent assertions done right
http://fluentasserts.szabobogdan.com/
MIT License
43 stars 6 forks source link

checks with const actual no longer compile #49

Closed linkrope closed 6 years ago

linkrope commented 6 years ago
unittest
{
    const actual = 42;
    actual.should.equal(42);
}

results in:

core/fluentasserts/core/base.d(449,5): Error: cannot modify const expression r.__expand_field_0
core/fluentasserts/core/base.d(513,39): Error: template instance fluentasserts.core.base.evaluate!(const(int)) error instantiating
instantiated from here: should!(const(int))

(for better reference, I created an issue from my earlier comment)

gedaiu commented 6 years ago

thanks! i'll look into it.