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

propertyAt:put: looks bogus #17563

Open
Ducasse opened this issue Dec 20, 2024 · 2 comments
Open

propertyAt:put: looks bogus #17563

Ducasse opened this issue Dec 20, 2024 · 2 comments

Comments

@Ducasse
Copy link
Member

Ducasse commented Dec 20, 2024

Once the property is set we cannot change it :(
The definition of propertyAt:put: looks wrong. at:ifAbsentPut: only change the value when it is not defined!

propertyAt: propName put: propValue
	^ self ensureProperties
		at: propName
		ifAbsentPut: propValue

So we cannot remove the aliases of a class :(

self propertyAt: #deprecatedAliases put: #()
>>> the old value and not #() 
@Ducasse
Copy link
Member Author

Ducasse commented Dec 20, 2024

Correct definition could be

propertyAt: propName put: propValue
	^ self ensureProperties
		at: propName
		put: propValue

@Ducasse
Copy link
Member Author

Ducasse commented Dec 20, 2024

We should write some tests on classes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant