Skip to content

Commit

Permalink
FIX: Fixed a bug with the import checking of the type parameter repre…
Browse files Browse the repository at this point in the history
…sentation. Should be revisited some time for a more in-depth analysis.
  • Loading branch information
tsaglam committed Aug 29, 2018
1 parent 680a4c8 commit cd8e1b2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ class TypeParameterRepresentation {
checkGenericType(argument, importDeclaration, ecoreInterface)
}
}

/**
* Checks if a import declarations ends with the name of the EClassifier of an EGenericType (which is either a type parameter bound or a generic argument of a type parameter bound). If that is the case, the import will be added to the list of necessary imports.
*/
def private void checkImport(IImportDeclaration importDeclaration, EGenericType type) {
if(importDeclaration.elementName.endsWith(type.EClassifier.name)) {
val name = type.EClassifier?.name
if(name !== null && importDeclaration.elementName.endsWith(name)) { // TODO (MEDIUM) when does this fail? (Generic Self Reference Test)
imports.add(importDeclaration.elementName) // add to import string list.
}
}
Expand Down

0 comments on commit cd8e1b2

Please sign in to comment.