Skip to content
This repository was archived by the owner on Apr 21, 2023. It is now read-only.

Conversation

@cdietrich
Copy link
Contributor

[eclipse-xtext/xtext#2259] allow extension fields in java 8 interfaces

@cdietrich cdietrich added this to the Release_2.31 milestone Feb 17, 2023
@cdietrich cdietrich requested a review from szarnekow February 17, 2023 13:47
IFeatureScopeSession result = featureScopeSession;
if (superType != null) {
result = addExtensionFieldsToMemberSession(resolvedTypes, featureScopeSession, (JvmDeclaredType) superType.getType(), thisFeature, seenNames, seenTypes);
for (JvmTypeReference ifx : type.getSuperTypes()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a better way? do we need sorting?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we'll need some sorting here to get a stable or understandable precedence. Now that we have to consider a graph due to multiple interface inheritance and also need to support duplicates that are allowed in that graph (following the superclass alone would only ever see dups for invalid hierarchies), a predictable order must be used.

org.eclipse.xtext.xbase.typesystem.override.ResolvedFeatures.computeAllOperationsFromSortedSuperTypes(JvmDeclaredType, Multimap<String, AbstractResolvedOperation>) might be a good starting point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arggg guess ill postpone until i find time to digg into

Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
@cdietrich
Copy link
Contributor Author

replaced with eclipse-xtext/xtext#2591

@cdietrich cdietrich closed this Apr 18, 2023
@cdietrich cdietrich deleted the cd_issue149 branch April 18, 2023 09:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants