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

Try harder to diagnose problem instead of reporting undeclared type #565

Merged
merged 1 commit into from Oct 7, 2017

Conversation

usev6
Copy link
Contributor

@usev6 usev6 commented Oct 28, 2015

Fixes RT #125902

@AlexDaniel
Copy link
Contributor

Can we have this rebased to resolve the conflict? Ping @usev6

@usev6
Copy link
Contributor Author

usev6 commented Dec 13, 2016

I'll test my changes with current nom and push an updated version.

instead of reporting 'Malformed my'

Fixes RT #125902
@AlexDaniel
Copy link
Contributor

I see no problem with this PR. It may be over-engineered as you say, but it gives awesome error messages. I was able to reproduce all of them:

my Str where foo $test;
===SORRY!=== Error while compiling -e
Malformed my (found type followed by constraint; did you forget a variable in between?)
at -e:1
------> my Str ⏏where ‘foo’ $test;
my Int is default(42)
===SORRY!=== Error while compiling -e
Malformed my (found type followed by trait; did you forget a variable in between?)
at -e:1
------> my Int ⏏is default(42)
my Str;
===SORRY!=== Error while compiling -e
Malformed my (did you forget a variable after type?)
at -e:1
------> my Str⏏;

Without this PR it simply says “malformed my” which is arguably LTA. Spectest clean, merging.

@AlexDaniel AlexDaniel merged commit c7a82d4 into rakudo:nom Oct 7, 2017
@jonathanstowe
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants