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

captured type applied as constraint in child scope missing methods #4375

Closed
p6rt opened this issue Jul 3, 2015 · 4 comments
Closed

captured type applied as constraint in child scope missing methods #4375

p6rt opened this issue Jul 3, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jul 3, 2015

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

Searchable as RT125537$

@p6rt
Copy link
Author

p6rt commented Jul 3, 2015

From @skids

$ perl6 -e 'sub f (​::T $a) { my T $b; { T.WHICH.say; $b.WHICH.say } }; f(1);'
Int
Int
$ perl6 -e 'sub f (​::T $a) { { my T $b; T.WHICH.say; $b.WHICH.say } }; f(1);'
Int
Method 'WHICH' not found for invocant of class 'T'
  in sub f at -e​:1
  in block <unit> at -e​:1

$ perl6 -e 'sub f (​::T $a) { my T $b; { T.say; $b.say } }; f(1);'
(Int)
(Int)

$ perl6 -e 'sub f (​::T $a) { { my T $b; T.say; $b.say } }; f(1);'
(Int)
Method 'say' not found for invocant of class 'T'
  in sub f at -e​:1
  in block <unit> at -e​:1

This is the root cause of commit 3d645fe4/7f9634764 breaking
:(​::T $a, T $b).perl

@p6rt
Copy link
Author

p6rt commented Jul 6, 2015

From @jnthn

On Thu Jul 02 22​:43​:18 2015, bri@​abrij.org wrote​:

$ perl6 -e 'sub f (​::T $a) { my T $b; { T.WHICH.say; $b.WHICH.say } };
f(1);'
Int
Int
$ perl6 -e 'sub f (​::T $a) { { my T $b; T.WHICH.say; $b.WHICH.say } };
f(1);'
Int
Method 'WHICH' not found for invocant of class 'T'
in sub f at -e​:1
in block <unit> at -e​:1

Fixed, and added test in S06-signature/type-captures.t.

@p6rt
Copy link
Author

p6rt commented Jul 6, 2015

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

@p6rt
Copy link
Author

p6rt commented Jul 6, 2015

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

@p6rt p6rt closed this as completed Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant