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

"is default(Mu)" parse failure when used on attribute #6513

Closed
p6rt opened this issue Sep 14, 2017 · 4 comments
Closed

"is default(Mu)" parse failure when used on attribute #6513

p6rt opened this issue Sep 14, 2017 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 14, 2017

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

Searchable as RT132082$

@p6rt
Copy link
Author

p6rt commented Sep 14, 2017

From @skids

"is default(Mu)" works fine on a variable, but runs into syntax issues on attributes...
weirdly... only for Mu.

$ perl6 -e 'my $a is default(Mu);'
$ perl6 -e 'class A { has $.a is default(Mu); }'
===SORRY!=== Error while compiling -e
Can't use unknown trait 'is default' in an attribute declaration.
at -e​:1
  expecting any of​:
  rw
  readonly
  box_target
  leading_docs
  trailing_docs
$ perl6 -e 'class A { has $.a is default(Nil); }'
$

I will be adding fudged tests to S02-names/is_default.t for this.

@p6rt
Copy link
Author

p6rt commented Oct 10, 2017

From @zoffixznet

On Wed, 13 Sep 2017 18​:27​:37 -0700, bri@​abrij.org wrote​:

"is default(Mu)" works fine on a variable, but runs into syntax issues
on attributes...
weirdly... only for Mu.

$ perl6 -e 'my $a is default(Mu);'
$ perl6 -e 'class A { has $.a is default(Mu); }'
===SORRY!=== Error while compiling -e
Can't use unknown trait 'is default' in an attribute declaration.
at -e​:1
expecting any of​:
rw
readonly
box_target
leading_docs
trailing_docs
$ perl6 -e 'class A { has $.a is default(Nil); }'
$

I will be adding fudged tests to S02-names/is_default.t for this.

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@54507ac94e
Tests (unfudged and expanded)​: Raku/roast@c537352009

@p6rt
Copy link
Author

p6rt commented Oct 10, 2017

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

@p6rt
Copy link
Author

p6rt commented Oct 10, 2017

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

@p6rt p6rt closed this as completed Oct 10, 2017
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant