Nowadays the error message no longer starts with the word 'Type':

$ perl6 -e 'role A::B {}; sub foo(A $a) {}'
===SORRY!=== Error while compiling -e
A cannot be used as a nominal type on a parameter
at -e:1
------> role A::B {}; sub foo(A ⏏$a) {}

$ perl6 -e 'package A { }; sub foo(A $a) { }'
===SORRY!=== Error while compiling -e
A cannot be used as a nominal type on a parameter
at -e:1
------> package A { }; sub foo(A ⏏$a) { }

The same error results with the following code, taken from ticket 117041:

$ perl6 -e 'role A::B {method foo(A $a) {} }'
===SORRY!=== Error while compiling -e
A cannot be used as a nominal type on a parameter
at -e:1
------> role A::B {method foo(A ⏏$a) {} }

Reply via email to