# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #57332]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57332 >


$ svn info | grep Revi
Revision: 29791

There's no problem matching against an extant class:

$ ./perl6 -e 'class A {}; say "mm, pie" ~~ A'
0

But matching against an undefined class doesn't work:

$ ./perl6 -e 'say "mm, pie" ~~ A'
Method 'ACCEPTS' not found for invocant of class 'Failure'
current instr.: 'infix:~~' pc 12501 (src/gen_builtins.pir:7936)
called from Sub '_block11' pc 34 (EVAL_13:17)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir:481)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir:708)
called from Sub 'parrot;Perl6::Compiler;main' pc 14567 (perl6.pir:172)

Now, it shouldn't work (because A hasn't been defined), but

* The error is all wrong. The class 'Failure' has got nothing to do with it.
* It feels like this could/should be intercepted at BEGIN time, just
like the `class DerivingClass is NotYetDefinedClass {}` error. In both
cases, it's a question of an undeclared bareword.

Reply via email to