diff --git a/pom.xml b/pom.xml index e6991f401e..240fb3b375 100644 --- a/pom.xml +++ b/pom.xml @@ -458,7 +458,7 @@ org.rascalmpl typepal - 0.16.4 + 0.16.6-RC1 compile diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectStatement.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectStatement.rsc index b6c77d3d95..8877c85fef 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectStatement.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectStatement.rsc @@ -715,7 +715,7 @@ private void checkAssignment(Statement current, (Assignable) `", name)){ c.use(name, variableRoles); } else { - c.define(base, variableId(), name, defType([statement], + c.define(base, variableId(), name, defLub([statement], AType(Solver s){ // TODO: this seemingly redundant call is needed; suspicion: the interpreter does not // handle the combination of return and possible exception thrown by s.getType properly diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/AssignmentTCTests.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/AssignmentTCTests.rsc index b29f4c2dd0..70a9a3575d 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/AssignmentTCTests.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/AssignmentTCTests.rsc @@ -218,6 +218,14 @@ test bool TUPLE4() = checkOK(" ltail == [2,3]; }"); +test bool TUPLE5() = checkOK(" + void main(){ + if(true){ + \ = \<123, false\>; + } + x = 456; + }"); + test bool E1() = checkOK("value zz = 1 + 2;"); test bool E2() = checkOK("value zz = 1 + 2.5; "); test bool E3() = unexpectedType("value zz = 1 + true; "); @@ -318,7 +326,6 @@ test bool AssignIntModuleVarOk() { "); } -// @ignore{Test needs typepal version > 0.15.1} test bool AssignAndIncrementIntModuleVarOk() { clearMemory(); writeModule("module A public int X = 1;"); @@ -349,7 +356,6 @@ test bool AssignAndIncrementListIntModuleVarOk() { "); } -//@ignore{Test needs typepal version > 0.15.1} test bool InferredVarAndModuleVarOk(){ clearMemory(); return checkModuleOK(" @@ -362,7 +368,6 @@ test bool InferredVarAndModuleVarOk(){ "); } -// @ignore{Test needs typepal version > 0.15.1} test bool InferredVarAndImportedModuleVarOk(){ clearMemory(); writeModule("module A public int X = 1;");