perl6/specs — pull request #10 by skids (2012-01-10 19:00:32+00:00)
Title: Clarify when prefix<::> can be used as in-place predeclarator

hrm.
rakudo: class A { multi method foo(::B $b) { say "Surprise! ::B is an en-passant type capture"; } }; class B { }; my B $b .= new(); my A $a .= new(); $a.foo($b); $a.foo(2);
rakudo 38165a: OUTPUT«Surprise! ::B is an en-passant type capture␤Surprise! ::B is an en-passant type capture␤»
skids: why is that a surprise exactly?
It's a surprise to anyone who thought they were using ::B to use a class before it was declared.
(which is something they will probably learn well before learning what an en-passant type capture is)
skids: The rule is that ::B only works for talking about as yet undeclared types in non-declarative scenarios. A signature is declarative.