Skip to content

Interpreter falsely reports "Undeclared type" during import #2554

@toinehartman

Description

@toinehartman

Describe the bug

On typepal 0.15.3, importing analysis::typepal::Collector results in the interpreter reporting an undeclared type Use in analysis::typepal::StringSimilarity. The typechecker does not.

Image

Use (from analysis::typepal::TModel) should be available:

  • module analysis::typepal::StringSimilarity
  • imports analysis::typepal::ConfigurableScopeGraph; (notably is in a cycle with analysis::typepal::StringSimilarity)
  • extends analysis::typepal::ISolver
  • extends analysis::typepal::AType
  • extends anaysis::typepal::TModel which defines data Use

Importing analysis::typepal::StringSimilarity first and analysis::typepal::Collector after does not trigger the error.

Image

To Reproduce

Steps to reproduce the behavior:

  1. Install vsix
  2. Open typepal on commit usethesource/typepal@241ba7e
  3. Open analysis::typepal::Collector
  4. Click inlay hint Import in new Rascal terminal

Expected behavior
No error.

Stack traces

Literally copy stacktraces from the console, or from the Eclipse Error log here.

Desktop (please complete the following information):
VSCode REPL
Path config:

[INFO] pom.xml: Rascal version is 0.41.0
[INFO] pom.xml: Project root is |file:///C:/Users/toine/swat/projects/Rascal/typepal/|
[INFO] pom.xml: Bin folder   is |file:///C:/Users/toine/swat/projects/Rascal/typepal/target/classes|
[INFO] pom.xml: Source module path is:
  - |std:///|
  - |file:///C:/Users/toine/swat/projects/Rascal/typepal/src|
  - |jar+file:///C:/Users/toine/.vscode/extensions/usethesource.rascalmpl-0.13.0-head3138/assets/jars/rascal-lsp.jar!/library|
[INFO] pom.xml: Library module (and classes) path is:
  - |file:///C:/Users/toine/.vscode/extensions/usethesource.rascalmpl-0.13.0-head3138/assets/jars/rascal.jar|
  - |mvn://junit--junit--4.13.1|
  - |mvn://org.hamcrest--hamcrest-core--1.3|
  - |file:///C:/Users/toine/.vscode/extensions/usethesource.rascalmpl-0.13.0-head3138/assets/jars/rascal-lsp.jar|

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions