Open p6rt opened 7 years ago
m: class C { method foo (--> ::?CLASS:D) { self } }; say .foo given C rakudo-moar 080630: OUTPUT«(C)»
Expected: typecheck failure, since `self` is not :D
And using ::?CLASS:D in the body of the method errors out, saying you
can't adverb ::?CLASS:
m: class C { method foo (--> ::?CLASS:D) { say (::?CLASS:D).HOW; self;
} }; say .foo given C
rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling
\
::?CLASS:D) { say (::?CLASS:D7⏏5).HOW; self; } }; say .foo given C
expecting any of: pair value»
Migrated from rt.perl.org#130151 (status was 'new')
Searchable as RT130151$