Browse files

make type of x=y by Y instead of X for #438

  • Loading branch information...
1 parent 741c325 commit ad195d3985af6e6e82569a9c2f559686f81743cc @gavinking gavinking committed Jan 5, 2013
View
4 src/com/redhat/ceylon/compiler/typechecker/analyzer/ExpressionVisitor.java
@@ -2905,8 +2905,8 @@ private void visitAssignOperator(Tree.AssignOp that) {
"assigned expression must be assignable to declared type",
2100);
}
- //that.setTypeModel(rhst); //stef requests lhst to make it easier on backend
- that.setTypeModel(lhst);
+ that.setTypeModel(rhst);
+// that.setTypeModel(lhst); //this version is easier on backend
}
private static void checkAssignability(Tree.Term that, Node node) {
View
5 test/main/typing/Operators.ceylon
@@ -330,4 +330,9 @@ class Operators() {
@type:"Set<String>" vss|=ss;
@type:"Set<String>" vss&=ss;
+ variable Object anythingAtAll = 0;
+ @type:"Integer" value somethingSpecial = anythingAtAll = 1;
+ @type:"Singleton<Float>" Singleton(anythingAtAll = 1.0);
+
+
}

0 comments on commit ad195d3

Please sign in to comment.