Java: Test generator: use getComponentType

This commit is contained in:
Joe Farebrother
2021-07-29 10:08:04 +01:00
parent d900fcaf42
commit f7099f459f

View File

@@ -521,7 +521,7 @@ predicate isImportable(Type t) {
*/
string getShortNameIfPossible(Type t) {
if t instanceof Array
then result = getShortNameIfPossible(t.(Array).getElementType()) + "[]"
then result = getShortNameIfPossible(t.(Array).getComponentType()) + "[]"
else (
getRootSourceDeclaration(t) = any(TestCase tc).getADesiredImport() and
if t instanceof RefType