Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More explicitly print the context if a name cannot be resolved #710

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

bobismijnnaam
Copy link
Contributor

This PR improves the error message when a name cannot be resolved in some situations.

Example program:

class C {
    void m() {
        assert Perm(f, write);
    }
}

Old error:

At null: type error: defined type f not found
The final verdict is Error

New error:

At null: type error: defined type f not found
=== xx.pvl                         ===
   1 class C {
   2     void m() {
                        [-
   3         assert Perm(f, write);
                         -]
   4     }
   5 }
-----------------------------------------
  Unknown name
=========================================
The final verdict is Error

@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 11:54 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 12:10 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 12:13 Inactive
@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

25.0% 25.0% Coverage
0.0% 0.0% Duplication

@bobismijnnaam bobismijnnaam merged commit 61be9a1 into dev Oct 27, 2021
@bobismijnnaam bobismijnnaam deleted the unresolved-name-error-message branch October 27, 2021 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants