[perl #126124] [BUG] definedness constraint mismatches reported incorrectly

2016-10-01 Thread Christian Bartolomaeus via RT
With Rakudo commit we get the same output on MoarVM and JVM:

$ ./perl6-j -e 'sub aa (Mu:D $a) { }; aa(Int)'
Parameter '$a' requires an instance of type Mu, but a type object was passed.  
Did you forget a .new?
  in sub aa at -e line 1
  in block  at -e line 1

$ ./perl6-j -e 'sub aa (Mu:U $a) { }; aa(3)'
Parameter '$a' requires a type object of type Mu, but an object instance was 
passed.  Did you forget a 'multi'?
  in sub aa at -e line 1
  in block  at -e line 1

I'm closing this ticket as 'resolved'.


[perl #126124] [BUG] definedness constraint mismatches reported incorrectly

2015-09-20 Thread via RT
# New Ticket Created by  Zefram 
# Please include the string:  [perl #126124]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=126124 >


$ ./perl6 -e 'sub aa (Mu:D $a) { }; aa(Int)'
Parameter '$a' requires an instance of type Int, but a type object was passed.  
Did you forget a .new?
  in sub aa at -e:1
  in block  at -e:1
$ ./perl6 -e 'sub aa (Mu:U $a) { }; aa(3)'
Parameter '$a' requires a type object of type Int, but an object instance was 
passed.  Did you forget a 'multi'?
  in sub aa at -e:1
  in block  at -e:1

In both cases it is correct to get an error of this general type,
regarding the definedness constraint.  But the desired type is
misreported: the class of the argument passed, rather than the desired
class, is being stated.

-zefram