diff --git a/tests/errors/UnknownIdentifier3.q b/tests/errors/UnknownIdentifier3.q new file mode 100644 index 0000000..c31b354 --- /dev/null +++ b/tests/errors/UnknownIdentifier3.q @@ -0,0 +1,3 @@ +main() { + x := 1 + f(x) +} \ No newline at end of file diff --git a/tests/errors/UnknownIdentifier4.q b/tests/errors/UnknownIdentifier4.q new file mode 100644 index 0000000..a7387e2 --- /dev/null +++ b/tests/errors/UnknownIdentifier4.q @@ -0,0 +1,7 @@ +main() { + x := 1 + f(x) +} + +f(x) { + return x +} \ No newline at end of file diff --git a/tests/errors_test.go b/tests/errors_test.go index c3d2a11..d1123bb 100644 --- a/tests/errors_test.go +++ b/tests/errors_test.go @@ -35,6 +35,8 @@ var errs = []struct { {"VariableAlreadyExists.q", &errors.VariableAlreadyExists{Name: "x"}}, {"UnknownIdentifier.q", &errors.UnknownIdentifier{Name: "x"}}, {"UnknownIdentifier2.q", &errors.UnknownIdentifier{Name: "x"}}, + {"UnknownIdentifier3.q", &errors.UnknownIdentifier{Name: "f"}}, + {"UnknownIdentifier4.q", &errors.UnknownIdentifier{Name: "x"}}, {"UnusedVariable.q", &errors.UnusedVariable{Name: "x"}}, }