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

LTA error message when declaring 'my Int a' in Rakudo #3293

Closed
p6rt opened this issue Dec 19, 2013 · 8 comments
Closed

LTA error message when declaring 'my Int a' in Rakudo #3293

p6rt opened this issue Dec 19, 2013 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 19, 2013

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

Searchable as RT120831$

@p6rt
Copy link
Author

p6rt commented Dec 19, 2013

From @masak

<skids> r​: my Int a; # LTA error
<camelia> rakudo-jvm 413650​: OUTPUT«===SORRY!===␤Type 'Int' is not
declared. Did you mean 'int'? [...] Malformed my [...]
* masak submits rakuodbug
<jnthn> std​: my Int a;
<camelia> std 3b262af​: OUTPUT«===SORRY!===␤Multiple prefix constraints
not yet supported [....] Malformed my [...]

I'd much rather see "Multiple prefix constraints" (as STD emits) than
"Type 'Int' is not declared." (It is declared.)

@p6rt
Copy link
Author

p6rt commented Aug 17, 2014

From @perlpilot

On Thu Dec 19 08​:00​:48 2013, masak wrote​:

<skids> r​: my Int a; # LTA error
<camelia> rakudo-jvm 413650​: OUTPUT«===SORRY!===␤Type 'Int' is not
declared. Did you mean 'int'? [...] Malformed my [...]
* masak submits rakuodbug
<jnthn> std​: my Int a;
<camelia> std 3b262af​: OUTPUT«===SORRY!===␤Multiple prefix constraints
not yet supported [....] Malformed my [...]

I'd much rather see "Multiple prefix constraints" (as STD emits) than
"Type 'Int' is not declared." (It is declared.)

The error message is different and more helpful now​:

➤ perl6 --version
This is perl6 version 2014.07-165-gf9f7464 built on MoarVM version 2014.07-388-ge953112
➤ perl6

my Int a;
===SORRY!=== Error while compiling <unknown file>
Malformed my (did you mean to declare a sigilless \a or $a?)
at <unknown file>​:1
------> my Int a⏏;

and

➤ ./perl6-j --version
This is perl6 version 2014.07-153-g0c42c11 built on JVM
➤ ./perl6-j

my Int a;
===SORRY!=== Error while compiling <unknown file>
Malformed my (did you mean to declare a sigilless \a or $a?)
at <unknown file>​:1
------> my Int a⏏;

-Scott

@p6rt
Copy link
Author

p6rt commented Aug 17, 2014

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

@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

From @usev6

Since the current error message looks reasonable to me (though different from STD's) I went ahead and added a test to S32-exceptions/misc.t with the following commit​: Raku/roast@5265f7d69e

But​: The new error message only happens with "my Int a;". Without the semicolon we get the old error message.

$ perl6-m -e 'my Int a;'
===SORRY!=== Error while compiling -e
Malformed my (did you mean to declare a sigilless \a or $a?)
at -e​:1
------> my Int a⏏;

$ perl6-m -e 'my Int a'
===SORRY!===
Type 'Int' is not declared. Did you mean 'int'?
at -e​:1
------> my Int ⏏a
Malformed my
at -e​:1
------> my Int ⏏a
  expecting any of​:
  scoped declarator

$ viv -c -e 'my Int a;'
===SORRY!===
Multiple prefix constraints not yet supported at (eval) line 1​:
------> my Int ⏏a;
Malformed my at (eval) line 1​:
------> my Int ⏏a;
  expecting any of​:
  multi_declarator
  typename
Parse failed

$ viv -c -e 'my Int a'
===SORRY!===
Multiple prefix constraints not yet supported at (eval) line 1​:
------> my Int ⏏a
Malformed my at (eval) line 1​:
------> my Int ⏏a
  expecting any of​:
  multi_declarator
  typename
Parse failed

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

From @usev6

Since the current error message looks reasonable to me (though different from STD's) I went ahead and added a test to S32-exceptions/misc.t with the following commit​: Raku/roast@5265f7d69e

But​: The new error message only happens with "my Int a;". Without the semicolon we get the old error message.

$ perl6-m -e 'my Int a;'
===SORRY!=== Error while compiling -e
Malformed my (did you mean to declare a sigilless \a or $a?)
at -e​:1
------> my Int a⏏;

$ perl6-m -e 'my Int a'
===SORRY!===
Type 'Int' is not declared. Did you mean 'int'?
at -e​:1
------> my Int ⏏a
Malformed my
at -e​:1
------> my Int ⏏a
  expecting any of​:
  scoped declarator

$ viv -c -e 'my Int a;'
===SORRY!===
Multiple prefix constraints not yet supported at (eval) line 1​:
------> my Int ⏏a;
Malformed my at (eval) line 1​:
------> my Int ⏏a;
  expecting any of​:
  multi_declarator
  typename
Parse failed

$ viv -c -e 'my Int a'
===SORRY!===
Multiple prefix constraints not yet supported at (eval) line 1​:
------> my Int ⏏a
Malformed my at (eval) line 1​:
------> my Int ⏏a
  expecting any of​:
  multi_declarator
  typename
Parse failed

@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

From @FROGGS

Patch by bartolin++​: rakudo/rakudo@4bdc880
Another test​: Raku/roast@1145029340

Closing ticket.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

From @FROGGS

Patch by bartolin++​: rakudo/rakudo@4bdc880
Another test​: Raku/roast@1145029340

Closing ticket.

@p6rt
Copy link
Author

p6rt commented Oct 27, 2015

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

@p6rt p6rt closed this as completed Oct 27, 2015
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant