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

Parsing of nested typenames fails #5361

Open
p6rt opened this issue Jun 5, 2016 · 3 comments
Open

Parsing of nested typenames fails #5361

p6rt opened this issue Jun 5, 2016 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 5, 2016

Migrated from rt.perl.org#128326 (status was 'open')

Searchable as RT128326$

@p6rt
Copy link
Author

p6rt commented Jun 5, 2016

From @hinrik

class Foo { has $.bar; method CALL-ME ($b) { self.new(bar => $b) } }; say Foo(Int(3434))

The above fails to parse, with "Unable to parse expression in typename; couldn't find final ')'". Is there any reason it shouldn't parse? The following do parse however​:

TypeA(5.TypeB) # won't work out of the box if TypeB is a custom type
TypeA($ = TypeB(5))
TypeA($(TypeB(5)))

@p6rt
Copy link
Author

p6rt commented Jun 15, 2016

From @zoffixznet

To add my findings​:

It can be replicated with core types alone. That last one is curious... "Cannot find method"..?

<Zoffix> m​: say Int(Int(3434))
<camelia> rakudo-moar ac0dcd​: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse expression in typename; couldn't find final ')' ␤at <tmp>​:1␤------> say Int(Int(⏏3434))␤»
<Zoffix> m​: say Int(+Int(3434))
<camelia> rakudo-moar ac0dcd​: OUTPUT«3434␤»
<Zoffix> m​: say Int({Int(3434)})
<camelia> rakudo-moar ac0dcd​: OUTPUT«Cannot find method 'Int' on object of type Block␤ in block <unit> at <tmp> line 1␤␤»

@p6rt
Copy link
Author

p6rt commented Jun 15, 2016

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

@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