Skip to content
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

trait 'is default' on attributes has no effect #4640

Closed
p6rt opened this issue Oct 10, 2015 · 9 comments
Closed

trait 'is default' on attributes has no effect #4640

p6rt opened this issue Oct 10, 2015 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Oct 10, 2015

Migrated from rt.perl.org#126318 (status was 'resolved')

Searchable as RT126318$

@p6rt
Copy link
Author

p6rt commented Oct 10, 2015

From @FROGGS

say class { has Int $.foo is default(0) }.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

class Foo { has Int $.foo is default(0) }; say Foo.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

I would expect that foo is zero in both cases.

@p6rt
Copy link
Author

p6rt commented Oct 16, 2015

From @TimToady

On Sat Oct 10 08​:33​:13 2015, FROGGS.de wrote​:

say class { has Int $.foo is default(0) }.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

class Foo { has Int $.foo is default(0) }; say Foo.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

I would expect that foo is zero in both cases.

Even less sensical, it violates its own :D here​:

p6 'say class { has Int​:D $.foo is default(0) }.new.foo'
(Int​:D)

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 16, 2015

From @TimToady

On Sat Oct 10 08​:33​:13 2015, FROGGS.de wrote​:

say class { has Int $.foo is default(0) }.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

class Foo { has Int $.foo is default(0) }; say Foo.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

I would expect that foo is zero in both cases.

Even less sensical, it violates its own :D here​:

p6 'say class { has Int​:D $.foo is default(0) }.new.foo'
(Int​:D)

@p6rt
Copy link
Author

p6rt commented Sep 14, 2017

From @skids

On Fri, 16 Oct 2015 00​:54​:21 -0700, larry wrote​:

On Sat Oct 10 08​:33​:13 2015, FROGGS.de wrote​:

say class { has Int $.foo is default(0) }.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

class Foo { has Int $.foo is default(0) }; say Foo.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

I would expect that foo is zero in both cases.

Even less sensical, it violates its own :D here​:

p6 'say class { has Int​:D $.foo is default(0) }.new.foo'
(Int​:D)

The first case was resolved with RT#​131387

The second case seems fixed.

Tests specifically for the second case still needed.

So maybe combine this with the latter and make a ruling on

@p6rt
Copy link
Author

p6rt commented Sep 14, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 14, 2017

From @skids

On Wed, 13 Sep 2017 19​:15​:36 -0700, bri@​abrij.org wrote​:

On Fri, 16 Oct 2015 00​:54​:21 -0700, larry wrote​:

On Sat Oct 10 08​:33​:13 2015, FROGGS.de wrote​:

say class { has Int $.foo is default(0) }.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

class Foo { has Int $.foo is default(0) }; say Foo.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

I would expect that foo is zero in both cases.

Even less sensical, it violates its own :D here​:

p6 'say class { has Int​:D $.foo is default(0) }.new.foo'
(Int​:D)

The first case was resolved with RT#​131387

The second case seems fixed.

Tests specifically for the second case still needed.

So maybe combine this with the latter and make a ruling on

Ignore that last sentence, I was going to suggest RT#​126296 but...

@p6rt
Copy link
Author

p6rt commented Mar 12, 2018

From @dogbert17

On Wed, 13 Sep 2017 19​:17​:16 -0700, bri@​abrij.org wrote​:

On Wed, 13 Sep 2017 19​:15​:36 -0700, bri@​abrij.org wrote​:

On Fri, 16 Oct 2015 00​:54​:21 -0700, larry wrote​:

On Sat Oct 10 08​:33​:13 2015, FROGGS.de wrote​:

say class { has Int $.foo is default(0) }.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

class Foo { has Int $.foo is default(0) }; say Foo.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

I would expect that foo is zero in both cases.

Even less sensical, it violates its own :D here​:

p6 'say class { has Int​:D $.foo is default(0) }.new.foo'
(Int​:D)

The first case was resolved with RT#​131387

The second case seems fixed.

Tests specifically for the second case still needed.

So maybe combine this with the latter and make a ruling on

Ignore that last sentence, I was going to suggest RT#​126296 but...

Second case fixed with commit rakudo/rakudo@148ba7f
Testneeded

@p6rt
Copy link
Author

p6rt commented Apr 7, 2018

From @AlexDaniel

Tests in
Raku/roast@ce1a5a2
and
Raku/roast@38c9dc5

Closing.

On 2018-03-12 06​:59​:31, jan-olof.hendig@​bredband.net wrote​:

On Wed, 13 Sep 2017 19​:17​:16 -0700, bri@​abrij.org wrote​:

On Wed, 13 Sep 2017 19​:15​:36 -0700, bri@​abrij.org wrote​:

On Fri, 16 Oct 2015 00​:54​:21 -0700, larry wrote​:

On Sat Oct 10 08​:33​:13 2015, FROGGS.de wrote​:

say class { has Int $.foo is default(0) }.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

class Foo { has Int $.foo is default(0) }; say Foo.new.foo
rakudo-moar 025ec1​: OUTPUT«(Int)␤»

I would expect that foo is zero in both cases.

Even less sensical, it violates its own :D here​:

p6 'say class { has Int​:D $.foo is default(0) }.new.foo'
(Int​:D)

The first case was resolved with RT#​131387

The second case seems fixed.

Tests specifically for the second case still needed.

So maybe combine this with the latter and make a ruling on

Ignore that last sentence, I was going to suggest RT#​126296 but...

Second case fixed with commit
rakudo/rakudo@148ba7f
Testneeded

@p6rt p6rt closed this as completed Apr 7, 2018
@p6rt
Copy link
Author

p6rt commented Apr 7, 2018

@AlexDaniel - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant