Commit a223491d authored by Chinmay Garde's avatar Chinmay Garde

Equality override on equation member returns a constraint

parent e66e8883
......@@ -15,7 +15,7 @@ abstract class _EquationMember {
Constraint operator <=(_EquationMember m) => asExpression() <= m;
/* Constraint */ operator ==(_EquationMember m) => asExpression() == m;
Constraint operator ==(_EquationMember m) => asExpression() == m;
Expression operator +(_EquationMember m) => asExpression() + m;
......
......@@ -585,4 +585,11 @@ void main() {
p.context = "b";
expect(p.context, "b");
});
test('check_type_of_eq_result', () {
Param left = new Param();
Param right = new Param();
expect((left == right).runtimeType, Constraint);
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment