Hi, Using the next code I get an error on the instantiation of $d2;
---
use v6;
class ABC {
method s ( Int $i ) { say $i + 10; }
}
subset DEF of ABC;
my ABC $a .= new;
$a.s(10); # 20
my DEF $d1 = $a;
$d1.s(11); # 21
my DEF $d2 .= new;
$d2.s(12);
---
Error is
You cannot create an instance of this type (DEF)
in block <unit> at xt/subset-test.pl6 line 15
Why is this?
Regards,
Marcel
