Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Oct 16, 2024
1 parent 3309fc4 commit abeae9c
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 472 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ test bool SharedKeywordsWork2() = checkModuleOK("
test bool D1() = unexpectedType("D x;");

test bool D2() = checkModuleOK("
module D1
module D2
data D;
D main() = D x;
D x;
");

test bool D3() = checkModuleOK("
module D3
data D = d1();
D main() = D x;
D x;
");

test bool D4() = checkModuleOK("
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ test bool UseVariableInConcreteSyntax() {
");
}

@ignore{status?}

test bool RedeclareConstructorError(){
writeModule("module MMM data DATA = d(int n);");
return unexpectedDeclarationInModule("
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test bool RecursiveDataTypeNoPossibleMatchHorizontal1() = cannotMatchInModule("
data Bool = and(Bool, Bool) | t();
data Prop = or(Prop, Prop) | f();
Prop p := and(t(),t());
bool main() = Prop p := and(t(),t());
");

test bool matchListError1() = redeclaredVariable("list[int] x = [1,2,3]; [1, *int L, 2, *int L] := x;");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ list[str] unexpectedDeclarationMsgs = [
"Invalid initialization of _",
"Undefined _",
"Double declaration of _",
"Constructor _ clashes with other declaration with comparable fields",
"Constructor _ overlaps with other declaration for type _, see _",
"Constructor _ is used without qualifier and overlaps with other declaration, _",
"Unresolved type for _",
"Constructor _ in formal parameter should be unique",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import lang::rascalcore::check::tests::StaticTestingUtils;

test bool Utils1() = checkModuleOK("
module Utils10
impor util::Math;
import util::Math;
int main() = max(3, 4);
");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ test bool NodeIndexError() = unexpectedTypeInModule("
test bool NodeAssignmentError() = unexpectedTypeInModule("
module NodeAssignmentError
data NODE = f(int a, str b, real c);
NODE N = f(0, \"a\", 3.5); N.b = 3;
void main(){
NODE N = f(0, \"a\", 3.5);
N.b = 3;
}
");

test bool wrongListIndex1() = unexpectedType("list[int] L = [0,1,2,3]; L[\"abc\"];");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ test bool Issue465b(){
module Issue465b
import MMM;
data Exp = con(int n);
void main() { c = con(5);
void main() { c = con(5); }
");
}

Expand Down
Loading

0 comments on commit abeae9c

Please sign in to comment.