Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

Using ::Foo type capture as default causes inconsistent bind result #6534

Open p6rt opened 6 years ago

p6rt commented 6 years ago

Migrated from rt.perl.org#132169 (status was 'new')

Searchable as RT132169$

p6rt commented 6 years ago

From @zoffixznet

IRC​: https://irclog.perlgeek.de/perl6/2017-09-26#i_15219996

I kinda expected the first version to work without trouble​:

19​:02 Zoffix m​: role Irrational[​::NuT = Int, :​:DeT = NuT] does Real { method new(NuT \nu = 0, DeT \de = 1) {self.bless} }; Irrational.new.^roles.say 19​:02 camelia rakudo-moar 6ec21c​: OUTPUT​: «Internal error​: inconsistent bind result␤ in method new at \ line 1␤ in block \ at \ line 1␤␤»

19​:04 m​: role Irrational[​::NuT = Int, :​:DeT = :​:("NuT")] does Real { method new(NuT \nu = 0, DeT \de = 1) {self.bless} }; Irrational.new.^roles.say 19​:04 camelia rakudo-moar 6ec21c​: OUTPUT​: «((Irrational) (Real) (Numeric))␤»