Skip to content

Commit

Permalink
[ui] Fixing generic type mapping for the auto-generated methods.
Browse files Browse the repository at this point in the history
close #727

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Sep 3, 2017
1 parent f321a60 commit 54f1c97
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -261,12 +261,14 @@ private Map<String, JvmTypeReference> buildTypeParameterMapping(XtendTypeDeclara
final LinkedList<JvmGenericType> expectedReferences = new LinkedList<>();
expectedReferences.add(genType);

final String objectId = Object.class.getName();

while (!expectedReferences.isEmpty()) {
final JvmGenericType type = expectedReferences.removeFirst();
if (!type.getTypeParameters().isEmpty() && encounteredTypes.add(type.getIdentifier())) {
if (encounteredTypes.add(type.getIdentifier())) {

for (final JvmTypeReference superType : type.getSuperTypes()) {
if (superType instanceof JvmParameterizedTypeReference) {
if (!objectId.equals(superType.getIdentifier()) && superType instanceof JvmParameterizedTypeReference) {
final JvmParameterizedTypeReference parametizedReference = (JvmParameterizedTypeReference) superType;
if (!parametizedReference.getArguments().isEmpty()) {
final JvmGenericType genericSuperType = (JvmGenericType) parametizedReference.getType();
Expand Down

0 comments on commit 54f1c97

Please sign in to comment.