Raku / old-issue-tracker

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

is looser [LTA] error if used incorrectly #4942

Open p6rt opened 8 years ago

p6rt commented 8 years ago

Migrated from rt.perl.org#127041 (status was 'new')

Searchable as RT127041$

p6rt commented 8 years ago

From @LLFourn

21​:46 \< lizmat> m​: sub a is looser {} 21​:46 \<+camelia> rakudo-moar 7e106c​: OUTPUT«===SORRY!=== Error while compiling /tmp/dyKjMCb7xA␤Can't use unknown   trait 'is looser' in a sub declaration.␤at /tmp/dyKjMCb7xA​:1␤ expecting any of​:␤ rw raw   hidden-from-backtrace hidden-from-USAGE␤ pure default DEPRECATED i…» 21​:47 \< llfourn> 'is looser' is actually in that error message which is a bit LTA :\ 21​:47 \< lizmat> m​: sub a is looser(infix​:\<+>) {} 21​:47 \<+camelia> rakudo-moar 7e106c​: OUTPUT«===SORRY!=== Error while compiling /tmp/4MtREU_vCv␤Can't use unknown   trait 'is looser' in a sub declaration.␤at /tmp/4MtREU_vCv​:1␤ expecting any of​:␤ rw raw   hidden-from-backtrace hidden-from-USAGE␤ pure default DEPRECATED i…» 21​:48 \< lizmat> llfourn​: that just means it's not finding the correct MMD candidate 21​:48 \< lizmat> llfourn​: I suggest you rakudobug it 21​:48 \< llfourn> lizmat​: okie dokes 21​:48 \< lizmat> m​: sub a is looser(&infix​:\<+>) {} 21​:48 \<+camelia> rakudo-moar 7e106c​: ( no output ) 21​:49 \< llfourn> lizmat​: so I'll rakudobug it as an LTA error? 21​:49 \< lizmat> well, yes, because apparently if you give it a Callable operator, it does work 21​:50 \< lizmat> m​: sub is looser(&infix​:\<+>) {}

sub a is looser {} #LTA sub a is looser(infix​:\<+>) {} #LTA sub a is looser(&infix​:\<+>) {} # works sub is looser(&infix​:\<+>) {} #LTA