-
Notifications
You must be signed in to change notification settings - Fork 1
is default
value not applied to attributes by default
#6285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @lizmat<lizmat> m: class A { has Int $.a is default(42) }; dd A.new.a # expected to see 42 there, not Int, so feels like "is default" on attrs isn't implemented? This doesn’t seem to be cause by BUILD, as the .CREATE part bypasses all of that. Weird! |
From @b2gillsOn Fri, 12 May 2017 03:04:46 -0700, elizabeth wrote:
It does work if you add =Nil class A { has Int $.a is rw is default(42) = Nil }; |
The RT System itself - Status changed from 'new' to 'open' |
From @lizmat
The whole reason for me to look at this, was to prevent the explicit initialization, done by BUILDALL. If you don’t, it still doesn’t work: $ 6 'class A { has Int $.a is rw is default(42) = Nil }; say A.CREATE.a' :-( |
From @zoffixznet<Zoffix___> m: my $z is default(Nil); dd |
From @jnthnOn Sat, 27 May 2017 19:35:53 -0700, cpan@zoffix.com wrote:
Seems fixed, test needed. 13:56 < jnthn> m: class Foo { has |
The RT System itself - Status changed from 'new' to 'open' |
From @skidsOn Tue, 12 Sep 2017 06:57:13 -0700, jnthn@jnthn.net wrote:
Tests done in roast 563f957d06, so resolving. |
@skids - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#131387 (status was 'resolved')
Searchable as RT131387$
The text was updated successfully, but these errors were encountered: