Skip to content

Mixed physical/logical locations in type checker messages #2767

@sungshik

Description

@sungshik

Describe the bug

Some messages produced by the type checker have logical locations; some have physical locations.

To Reproduce

  1. Set a breakpoint on the first line of method translateCheckResults in RascalLanguageServices.java. This function processes the messages produced by the type checker.
  2. Launch a VS Code instance with the Rascal extension using the "Run Extension" launch configuration
  3. Open a test workspace and run mvn clean
  4. Create the following modules:
    // A.rsc
    module A
    import B;
    str x = y;
    
    // B.rsc
    module B
    public str y = "foo";
    public int z = false;
  5. Trigger the type checker. The breakpoint will be hit. Inspect variable messages. It will show two messages with a physical location.
  6. Add a space somewhere and trigger the type checker again. The breakpoint will be hit. Inspect variable messages. It will show two messages with a physical location and one message with a logical location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions