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

Rakudo doesn't support the syntax 'my Type subset NewType' (but STD.pm6) #2254

Closed
p6rt opened this issue Nov 13, 2010 · 6 comments
Closed

Rakudo doesn't support the syntax 'my Type subset NewType' (but STD.pm6) #2254

p6rt opened this issue Nov 13, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Nov 13, 2010

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

Searchable as RT79160$

@p6rt
Copy link
Author

p6rt commented Nov 13, 2010

From @masak

<masak> std​: my Str subset Username;
<p6eval> std a194beb​: OUTPUT«ok 00​:01 118m␤»
<masak> rakudo​: my Str subset Username;
<p6eval> rakudo 2c66f9​: OUTPUT«===SORRY!===␤Unknown declarator type at
line 22, near ";"␤»
<tadzik> . o O (masak submits rakudobug)
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented May 28, 2012

From @coke

On Sat Nov 13 08​:27​:52 2010, masak wrote​:

<masak> std​: my Str subset Username;
<p6eval> std a194beb​: OUTPUT«ok 00​:01 118m␤»
<masak> rakudo​: my Str subset Username;
<p6eval> rakudo 2c66f9​: OUTPUT«===SORRY!===␤Unknown declarator type at
line 22, near ";"␤»
<tadzik> . o O (masak submits rakudobug)
* masak submits rakudobug

my Str subset Username;
Username()

Closable with tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented May 28, 2012

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

@p6rt
Copy link
Author

p6rt commented May 28, 2012

From @moritz

Not quite closable​:

19​:20 < moritz> r​: my Str subset Foo; say 1 ~~ Foo
19​:20 <+p6eval> rakudo 197e0b​: OUTPUT«True␤»
19​:20 < moritz> r​: my Str subset Foo; say Any ~~ Foo
19​:20 <+p6eval> rakudo 197e0b​: OUTPUT«True␤»
19​:20 < moritz> r​: my Str subset Foo; say Mu ~~ Foo

so it seems to install the new subset as an alias for Any, not as an
alias for the type that is used upfront.

Tests are in S12-subset/subtypes.t, one of them failing.

@p6rt
Copy link
Author

p6rt commented Aug 10, 2014

From @perlpilot

On Mon May 28 10​:23​:43 2012, moritz wrote​:

Not quite closable​:

19​:20 < moritz> r​: my Str subset Foo; say 1 ~~ Foo
19​:20 <+p6eval> rakudo 197e0b​: OUTPUT«True␤»
19​:20 < moritz> r​: my Str subset Foo; say Any ~~ Foo
19​:20 <+p6eval> rakudo 197e0b​: OUTPUT«True␤»
19​:20 < moritz> r​: my Str subset Foo; say Mu ~~ Foo

so it seems to install the new subset as an alias for Any, not as an
alias for the type that is used upfront.

Tests are in S12-subset/subtypes.t, one of them failing.

Fixed in rakudo/rakudo@c270e91

-Scott

@p6rt
Copy link
Author

p6rt commented Aug 10, 2014

@perlpilot - 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