Skip to content

Commit

Permalink
Default values for EAttributes with generics is not generated #22
Browse files Browse the repository at this point in the history
GenFeature.hasEDefault() will now  also return true for all EAttributes
that has a non-null default value literal
  • Loading branch information
claesrosell authored and merks committed Jan 21, 2024
1 parent 5eae128 commit 87ba85d
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -2600,6 +2600,7 @@ public boolean hasEDefault()
return
getEcoreFeature() instanceof EAttribute &&
(getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50 ||
((EAttribute)getEcoreFeature()).getDefaultValueLiteral() != null ||
(getEcoreFeature().getEType() != null &&
getEcoreFeature().getEType().getETypeParameters().isEmpty() &&
getEcoreFeature().getEGenericType().getETypeParameter() == null &&
Expand Down

0 comments on commit 87ba85d

Please sign in to comment.