Skip to content

commonSuperclassWith: does not work with metaclasses #18449

@Ducasse

Description

@Ducasse

While

Array commonSuperclassWith: Interval
>> SequenceableCollection 

The same expression on metaclass fails.

Array class commonSuperclassWith: Interval class
```

```
commonSuperclassWith: aClass
	"return the next common superclass between me and aClass. If I am the superclass of aClass, that is me"
	<reflection: 'Class structural inspection - Iterating and querying hierarchy'>
	^ self withAllSuperclasses detect: [ :class | (aClass allSuperclasses includes: class) ] ifNone: nil
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions