[IDEA-204272] Fix varargs params losing generic info
Regression introduced in commit 82a2939271
"java-decompiler: cleanups and fixes"
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.java.decompiler.struct.gen.generics;
|
||||
|
||||
import org.jetbrains.java.decompiler.code.CodeConstants;
|
||||
@@ -28,6 +28,17 @@ public class GenericType {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public GenericType(GenericType other, int arrayDim) {
|
||||
this.type = other.type;
|
||||
this.value = other.value;
|
||||
|
||||
this.enclosingClasses.addAll(other.enclosingClasses);
|
||||
this.arguments.addAll(other.arguments);
|
||||
this.wildcards.addAll(other.wildcards);
|
||||
|
||||
this.arrayDim = arrayDim;
|
||||
}
|
||||
|
||||
public GenericType(String signature) {
|
||||
int type = 0;
|
||||
int arrayDim = 0;
|
||||
@@ -197,7 +208,7 @@ public class GenericType {
|
||||
|
||||
public GenericType decreaseArrayDim() {
|
||||
assert arrayDim > 0 : this;
|
||||
return new GenericType(type, arrayDim - 1, value);
|
||||
return new GenericType(this, arrayDim - 1);
|
||||
}
|
||||
|
||||
public List<GenericType> getArguments() {
|
||||
|
||||
Reference in New Issue
Block a user