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

hasSpecificLayout should delegate with dispatch to layout #6663

Closed
Ducasse opened this issue Jun 23, 2020 · 0 comments · Fixed by #6670
Closed

hasSpecificLayout should delegate with dispatch to layout #6663

Ducasse opened this issue Jun 23, 2020 · 0 comments · Fixed by #6670

Comments

@Ducasse
Copy link
Member

Ducasse commented Jun 23, 2020

The current implementation is

Behavior >> hasSpecificLayout [
 	"Return true whether the receiver has a layout that is not a fixed one (which is the default linear layout for default classes."
 	"Point hasSpecificLayout >>> false"
 	"Array hasSpecificLayout >>> true"

 	^ (self classLayout isKindOf: FixedLayout) not

a better one should be

Behavior >> hasSpecificLayout [
 	"Return true whether the receiver has a layout that is not a fixed one (which is the default linear layout for default classes."
 	"Point hasSpecificLayout >>> false"
 	"Array hasSpecificLayout >>> true"

 	^ (self classLayout isFixedLayout) not
MarcusDenker added a commit to MarcusDenker/pharo that referenced this issue Jun 24, 2020
- use it in definitionWithSlots instead of isKindOf:
- #hasSpecificLayout now uses isFixedLayout

fixes pharo-project#6663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant