Commit e66e8883 authored by Chinmay Garde's avatar Chinmay Garde

Parameter contexts are non-final

parent 704d0174
......@@ -6,11 +6,9 @@ part of cassowary;
class Param extends _EquationMember {
final Variable variable;
final dynamic context;
dynamic context;
Param([double value = 0.0])
: variable = new Variable(value),
context = null {
Param([double value = 0.0]) : variable = new Variable(value) {
variable._owner = this;
}
......
......@@ -579,4 +579,10 @@ void main() {
expect(mid.value, 50.0);
expect(right.value, 90.0);
});
test('param_context_non_final', () {
var p = new Param.withContext("a");
p.context = "b";
expect(p.context, "b");
});
}
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