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

malformed "my" spuriously claims lack of type declaration #4570

Closed
p6rt opened this issue Sep 20, 2015 · 5 comments
Closed

malformed "my" spuriously claims lack of type declaration #4570

p6rt opened this issue Sep 20, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Sep 20, 2015

Migrated from rt.perl.org#126125 (status was 'resolved')

Searchable as RT126125$

@p6rt
Copy link
Author

p6rt commented Sep 20, 2015

From zefram@fysh.org

Playing around trying to get a definedness constraint on a variable
(which I now understand is just unimplemented), I got this from a
syntactic mistake​:

$ ./perl6 -e 'my Any :D $a'
===SORRY!===
Type 'Any' is not declared
at -e​:1
------> my Any ^​:D $a
Malformed my
at -e​:1
------> my Any ^​:D $a

Presumably the "malformed my" error is correct, but the preceding "type
'Any' is not declared" is bogus. Obviously Any *is* declared. The logic
emitting the error can see other declared types​: doing it with Int gets a
"did you mean 'int'?", and doing it with int gets "did you mean 'Int'?".
Doing it with a genuinely undeclared type name gets a different location
for the "malformed my" error.

-zefram

@p6rt
Copy link
Author

p6rt commented Sep 11, 2017

From @smls

On Sun, 20 Sep 2015 14​:00​:53 -0700, zefram@​fysh.org wrote​:

Presumably the "malformed my" error is correct, but the preceding "type
'Any' is not declared" is bogus.

It now no longer prints the bogus "type 'Any' is not declared" error, only the correct "malformed my" error​:

  ➜ my Any⏏ :D $a;
  ===SORRY!=== Error while compiling​:
  Malformed my
  ------> my Any⏏⏏ :D $a;

Bisectable6 reports¹ that it was fixed by a commit² in November 2015.

It should be possible to test in roast that this throws `X​::Syntax​::Malformed` and not whatever "type not declared" uses, right?

Marking the ticket TESTNEEDED.


[1] https://gist.github.com/Whateverable/ee54f5241e3cb77ea3969ff3481d8d9b
[2] rakudo/rakudo@e1e03e6

@p6rt
Copy link
Author

p6rt commented Sep 11, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 16, 2017

From @zoffixznet

Tests Raku/roast@03686da

@p6rt
Copy link
Author

p6rt commented Dec 16, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Dec 16, 2017
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant