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

OpalCompilerTest and others should not hard code Smalltalk compiler #17891

Open
Ducasse opened this issue Feb 26, 2025 · 0 comments
Open

OpalCompilerTest and others should not hard code Smalltalk compiler #17891

Ducasse opened this issue Feb 26, 2025 · 0 comments

Comments

@Ducasse
Copy link
Member

Ducasse commented Feb 26, 2025

testEvaluateWithBindings
	| result |
	result := Smalltalk compiler
		bindings: {(#a -> 3)} asDictionary;
		evaluate: '1+a'.
	self assert: result equals: 4

=>
A possible solution

testEvaluateWithBindings
	| result |
	result := (self class environment at: #OpalCompiler) new 
		bindings: {(#a -> 3)} asDictionary;
		evaluate: '1+a'.
	self assert: result equals: 4
testEvaluateWithBindings
	| result |
	result := OpalCompiler new 
		bindings: {(#a -> 3)} asDictionary;
		evaluate: '1+a'.
	self assert: result equals: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant