Open
Description
Describe the bug
When typechecking a specific (seemingly correct) Rascal module, no errors are generated.
But when typechecking a module that imports this module an error is generated:
"Invalid check return type; type of one or more subparts could not be inferred"
To Reproduce
- Add two modules:
module sandbox::A
int() fGen() {
int f() = 1;
default int f() = 0;
return f;
}
and:
module sandbox::C
import sandbox::A;
- Make a whitespace change in module A and save it to trigger the typechecker. The module should typecheck ok.
- Make a whitespace change in module B and save it to trigger the typechecker. A typecheck error will appear in module A.
Expected behavior
Typechecking should not result in errors (only a warning about the import of module A not being used).
Screenshots
Version info
VS Code extension version 0.12.2 and self-built VS Code extension with the latest rascal and rascal core from main.
Additional context
Note that changing module A like this:
module sandbox::A
int() fGen() {
int f() = 1;
default int f() = 0;
int() returnF = f;
return returnF;
}
makes the issue go away completely.
Activity