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

Nicer error message on name duplicates #255

merged 1 commit into from Mar 27, 2018


Copy link

@dahlia dahlia commented Mar 26, 2018

Continued from #254. Now give nicer error message on name duplicates. Offset line/column number became accurate.

Where the following Nirum code is given:

union bar = foo
          | bar
          | baz;

Although the compiler had given the following error message (which refers to inaccurate offset line/column number):

the facial type name `bar` is duplicated


It's now like the following:

the tag name `bar` is duplicated

          | bar

See also the added "handling name duplications" test case.

@dahlia dahlia added typ:bug Type: Bug/defect cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) labels Mar 26, 2018
@dahlia dahlia self-assigned this Mar 26, 2018
@dahlia dahlia requested a review from kanghyojun March 26, 2018 19:53
Copy link

checkmate-bot commented Mar 26, 2018

Checklist 🤔


  • If a new reserved keyword is introduced, it has to be also added to reservedKeywords set in the Nirum.Constructs.Identifier module.

Copy link

codecov bot commented Mar 26, 2018

Codecov Report

Merging #255 into master will increase coverage by 0.64%.
The diff coverage is 94.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #255      +/-   ##
+ Coverage   73.13%   73.77%   +0.64%     
  Files          33       33              
  Lines        2356     2391      +35     
  Branches      130      124       -6     
+ Hits         1723     1764      +41     
  Misses        503      503              
+ Partials      130      124       -6
Impacted Files Coverage Δ
src/Nirum/Parser.hs 86.86% <94.02%> (+2.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4529e07...8fd42c8. Read the comment docs.

@dahlia dahlia merged commit 8fd42c8 into nirum-lang:master Mar 27, 2018
dahlia added a commit that referenced this pull request Mar 27, 2018
Nicer error message on name duplicates
@dahlia dahlia added this to the Version 0.4.0 milestone May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) typ:bug Type: Bug/defect
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants