Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
<dependency>
<groupId>org.rascalmpl</groupId>
<artifactId>typepal</artifactId>
<version>0.16.4</version>
<version>0.16.6-RC1</version>
<!-- <scope>provided</scope> for shade plugin it can't be provided. At least the rascal dependency in typepal should be provided -->
<scope>compile</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ private void checkAssignment(Statement current, (Assignable) `<QualifiedName nam
if(c.isAlreadyDefined("<name>", 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ test bool TUPLE4() = checkOK("
ltail == [2,3];
}");

test bool TUPLE5() = checkOK("
void main(){
if(true){
\<x, _\> = \<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; ");
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -349,7 +356,6 @@ test bool AssignAndIncrementListIntModuleVarOk() {
");
}

//@ignore{Test needs typepal version > 0.15.1}
test bool InferredVarAndModuleVarOk(){
clearMemory();
return checkModuleOK("
Expand All @@ -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;");
Expand Down
Loading