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

wrong "self" inside class definition inside EVAL inside class #4793

Closed
p6rt opened this issue Nov 28, 2015 · 4 comments
Closed

wrong "self" inside class definition inside EVAL inside class #4793

p6rt opened this issue Nov 28, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Nov 28, 2015

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

Searchable as RT126754$

@p6rt
Copy link
Author

p6rt commented Nov 28, 2015

From @skids

Relatively recent regression​:

(01​:22​:01 AM) skids​: m​: class A { method foo { EVAL "class GLOBAL​::B \{ method bar \{ self.WHAT.say } }" } }; A.foo; EVAL "B.new.bar";
(01​:22​:01 AM) camelia​: rakudo-moar a148bf​: OUTPUT«(A)␤»
(01​:22​:09 AM) skids​: star​: class A { method foo { EVAL "class GLOBAL​::B \{ method bar \{ self.WHAT.say } }" } }; A.foo; EVAL "B.new.bar";
(01​:22​:09 AM) camelia​: star-m 2015.09​: OUTPUT«(B)␤»
(01​:22​:22 AM) skids​: ^^That is what broke Inline​::Perl5 I believe.

@p6rt
Copy link
Author

p6rt commented Dec 10, 2015

From @skids

On Fri Nov 27 22​:54​:52 2015, bri@​abrij.org wrote​:

Relatively recent regression​:

(01​:22​:01 AM) skids​: m​: class A { method foo { EVAL "class GLOBAL​::B
\{ method bar \{ self.WHAT.say } }" } }; A.foo; EVAL "B.new.bar";
(01​:22​:01 AM) camelia​: rakudo-moar a148bf​: OUTPUT«(A)␤»
(01​:22​:09 AM) skids​: star​: class A { method foo { EVAL "class
GLOBAL​::B \{ method bar \{ self.WHAT.say } }" } }; A.foo; EVAL
"B.new.bar";
(01​:22​:09 AM) camelia​: star-m 2015.09​: OUTPUT«(B)␤»
(01​:22​:22 AM) skids​: ^^That is what broke Inline​::Perl5 I believe.

commit 67749a7716bcf438973131a38a12d2f2ee53c855
Author​: TimToady <larry@​wall.org>
Date​: Wed Dec 9 10​:35​:30 2015 -0800

  make self non-overridable

  otherwise an EVAL creating a method within a method gets the wrong self

commit 2113310307ae4060fd0dac8436b997e6200d21fd
Author​: skids <bri@​abrij.org>
Date​: Wed Dec 9 19​:33​:27 2015 -0500

  Add test for RT#​126754

closing.

@p6rt
Copy link
Author

p6rt commented Dec 10, 2015

From @skids

closing.

@p6rt p6rt closed this as completed Dec 10, 2015
@p6rt
Copy link
Author

p6rt commented Dec 10, 2015

@skids - Status changed from 'new' to 'resolved'

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