Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

error message with junctions in type constraints #4612

Open p6rt opened 8 years ago

p6rt commented 8 years ago

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

Searchable as RT126234$

p6rt commented 8 years ago

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 commented 8 years ago

From @smls

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

  my Int|Str $a;   ===SORRY!=== Error while compiling \   Malformed my   at \​: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 commented 8 years ago

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

raiph commented 3 years ago

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