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

error message with junctions in type constraints #4612

Open
p6rt opened this issue Oct 1, 2015 · 4 comments
Open

error message with junctions in type constraints #4612

p6rt opened this issue Oct 1, 2015 · 4 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Oct 1, 2015

Migrated from rt.perl.org#126234 (status was 'open')

Searchable as RT126234$

@p6rt
Copy link
Author

p6rt commented Oct 1, 2015

From @gfldex

my Int|Str $a;
# OUTPUT«===SORRY!===␤Type 'Int' is not declared. Did yo mean 'int'?␤at /tmp/kuUWtnhKeF​:1␤------> my Int⏏|Str
$a;␤Malformed my␤ /tmp/kuUWtnhKeF​:1␤------> my Int⏏|Str $a;␤
#
# Int is very much declared at that spot.

sub foo(Int|Str $a){};
# OUTPUT«===SORRY!===␤No compile-time value for Str␤»
#
# That may very well be true but ain't no helpful either.

@p6rt
Copy link
Author

p6rt commented May 20, 2016

From @smls

The error message for the first case has improved (test needed)​:

  my Int|Str $a;
  ===SORRY!=== Error while compiling <unknown file>
  Malformed my
  at <unknown file>​:1
  ------> my Int⏏|Str $a;

The second case is still reproducible.


This is Rakudo version 2016.04-210-gc59e4dc built on MoarVM version 2016.05
implementing Perl 6.c.

@p6rt
Copy link
Author

p6rt commented May 20, 2016

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

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
@raiph
Copy link

raiph commented Mar 20, 2021

The error message for the second case has also improved (don't know if test needed)​:

sub foo (Int|Str $a) {}

===SORRY!=== Error while compiling
Malformed parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

2 participants