On Mon Sep 21 11:22:24 2015, zef...@fysh.org wrote: > $ ./perl6 -e 'sub aa(int:U $i) { say $i; }; aa(3); aa(int)' > 3 > Cannot unbox a type object > in sub aa at -e:1 > in block <unit> at -e:1 > > The definedness constraint qualifiers :D and :U are ignored for the int > type, even though in this context of a parameter declaration they work > for most types. This is misleading. The qualifiers should signal an > error in this situation, unless and until they are implemented so as to > have the obvious effect. > A native type cannot hold an undefined value, so writing :U should be a compile time error (it could never match, so probably indicates confusion). May as well do similar for :D.
/jnthn