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

UndeclaredVariable should re-lookup on reflective read/write #16665

Open
MarcusDenker opened this issue May 17, 2024 · 0 comments
Open

UndeclaredVariable should re-lookup on reflective read/write #16665

MarcusDenker opened this issue May 17, 2024 · 0 comments

Comments

@MarcusDenker
Copy link
Member

UndeclaredVariable now raises an exception when read or written. See for read:

runtimeUndeclaredReadInContext: aContext

	<debuggerCompleteToSender>
	^ UndeclaredVariableRead new
		messageText: 'Attempt to read undeclared variable ' , self name;
		variable: self;
		signal

We should, before raising the exception, re-lookup the name and if we find a Variable, delegate the access.

This will allow us in a second step to simplify Undeclared repair as we can just rely on re-compilation to fix installed methods (see #16664), for methods on the stack, the Undeclared re-lookup will make sure that the read and write will work for the case the name has been defined in the meantime.

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