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

parametric role generic type not resolving early enough? #4248

Open
p6rt opened this issue May 15, 2015 · 4 comments
Open

parametric role generic type not resolving early enough? #4248

p6rt opened this issue May 15, 2015 · 4 comments
Labels
Bug

Comments

@p6rt
Copy link

@p6rt p6rt commented May 15, 2015

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

Searchable as RT125200$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 15, 2015

From @jdv

Some examples that I expected would be equivalent​:

1. WHAT

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say Foo[Int].new.a.perl'
Array[Int].new()
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say Foo[Int].new.a.WHAT'
(Array[T])
[jdv@​wieldy ~]$

2. method call on type obj

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say Foo[Int].new.a.perl'
Array[Int].new()
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say Foo[Int].new.a.perl'
Method 'perl' not found for invocant of class 'T'
  in block <unit> at -e​:1

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 15, 2015

From @jdv

The first example there should have been​:

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say Foo[Int].new.a.WHAT'
(Array[Int])
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say Foo[Int].new.a.WHAT'
(Array[T])
[jdv@​wieldy ~]$

Oops.

On Fri May 15 11​:20​:36 2015, jdv79 wrote​:

Some examples that I expected would be equivalent​:

1. WHAT

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say
Foo[Int].new.a.perl'
Array[Int].new()
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say
Foo[Int].new.a.WHAT'
(Array[T])
[jdv@​wieldy ~]$

2. method call on type obj

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say
Foo[Int].new.a.perl'
Array[Int].new()
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say
Foo[Int].new.a.perl'
Method 'perl' not found for invocant of class 'T'
in block <unit> at -e​:1

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Dec 3, 2017

From @AlexDaniel

Still reproducible (2017.11,HEAD(e5b660e))

On 2015-05-15 11​:25​:07, jdv79 wrote​:

The first example there should have been​:

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say
Foo[Int].new.a.WHAT'
(Array[Int])
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say
Foo[Int].new.a.WHAT'
(Array[T])
[jdv@​wieldy ~]$

Oops.

On Fri May 15 11​:20​:36 2015, jdv79 wrote​:

Some examples that I expected would be equivalent​:

1. WHAT

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say
Foo[Int].new.a.perl'
Array[Int].new()
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say
Foo[Int].new.a.WHAT'
(Array[T])
[jdv@​wieldy ~]$

2. method call on type obj

[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has Int @​.a }; say
Foo[Int].new.a.perl'
Array[Int].new()
[jdv@​wieldy ~]$ perl6 -e 'role Foo[​::T] { has T @​.a }; say
Foo[Int].new.a.perl'
Method 'perl' not found for invocant of class 'T'
in block <unit> at -e​:1

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Dec 3, 2017

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
Projects
None yet
1 participant
You can’t perform that action at this time.