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
<lizmat> jnthn: another issue I just realized: can you replace a method in an augment ?
<lizmat> if we're adding a BUILD method at compose time, we cannot add a possibly changed BUILD method when augmenting
<lizmat> m: use MONKEY; class Foo {}; augment class Foo { has $.a } # this appears to be legal
<+camelia> rakudo-moar 6bdb2d: ( no output )
<jnthn> m: use MONKEY; class Foo {}; BEGIN Foo.new; augment class Foo { has $.a }
<+camelia> rakudo-moar 6bdb2d: ( no output )
<jnthn> Huh...
<jnthn> m: use MONKEY; class Foo {}; BEGIN Foo.new; augment class Foo { has $.a }; Foo.new
<+camelia> rakudo-moar 6bdb2d: ( no output )
<jnthn> m: use MONKEY; class Foo {}; BEGIN Foo.new; augment class Foo { has $.a }; Foo.new.a.say
<+camelia> rakudo-moar 6bdb2d: OUTPUT: «P6opaque: no such attribute '$!a' in type Foo when trying to get a value in block <unit> at <tmp> line 1»
<jnthn> Right, that clearly can't work, but where is the error going :S
<lizmat> so: we should disallow adding attributes on augment ?
<jnthn> It used to throw (at compile time) if you tried
<jnthn> I don't know when that regressed
<lizmat> ok, well, that's a relief
<lizmat> I guess we need to add a test :-)
<jnthn> https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/P6opaque.c#L652 fwiw
Migrated from rt.perl.org#132157 (status was 'new')
Searchable as RT132157$
The text was updated successfully, but these errors were encountered: