You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a defined value is used as a type constraint, the values that the
constraint will accept are inconsistent between using the type constraint
on a variable and using it on a sub parameter:
constant T = 3
3
3.^isa(T)
0
(sub (T $a) { 1 })(3)
1
my T $a = 3
Type check failed in assignment to $a; expected 3 but got 3
in block <unit> at <unknown file>:1
The two type constraint situations are consistent in disallowing other
values such as 2, "foo", and Int. It probably should not be permitted
at all to use anything other than a type object as a type constraint.
See also [perl #126117].
Migrated from rt.perl.org#126906 (status was 'new')
Searchable as RT126906$
The text was updated successfully, but these errors were encountered: