You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one is also mostly done and again great work @mahills! I found two remaining issues where a variable (in this test X) is introduced at the position of the default value of a keyword parameter and is not properly introduced by the TC. This applies both to ADT patterns and node patterns:
module experiments::Compiler::Examples::Tst
data F1 = f1(int N, int M = 10, bool B = false) | f1(str S);
public test bool matchADTwithKeywords5() = f1(1, M=X) := f1(1, B=false, M=20) && X == 20;
public test bool matchNodeWithKeywords16() = "f1"(1, M=X) := "f1"(1, B=false, M=20) && X == 20;
gives
error("Name X is not in scope",|rascal:///experiments/Compiler/Examples/Tst.rsc|(291,1,<7,87>,<7,88>))
error("Name X is not in scope",|rascal:///experiments/Compiler/Examples/Tst.rsc|(194,1,<5,87>,<5,88>))
I commented on #277 but that now relates to this -- the remaining case appears to be a pattern where the constructed term is of type node instead of using the constructor name directly.
This
gives
The text was updated successfully, but these errors were encountered: