Incorrect comparison to default bound fixed
This commit is contained in:
@@ -599,7 +599,7 @@ public class DescriptorRenderer implements Renderer<DeclarationDescriptor> {
|
||||
renderName(descriptor, builder);
|
||||
if (descriptor.getUpperBounds().size() == 1) {
|
||||
JetType upperBound = descriptor.getUpperBounds().iterator().next();
|
||||
if (upperBound != KotlinBuiltIns.getInstance().getDefaultBound()) {
|
||||
if (!KotlinBuiltIns.getInstance().getDefaultBound().equals(upperBound)) {
|
||||
builder.append(" : ").append(renderType(upperBound));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ public class BoundsSubstitutorTest extends KotlinTestWithEnvironment {
|
||||
|
||||
public void testSimpleSubstitution() throws Exception {
|
||||
doTest("fun <T> f(l: List<T>): T",
|
||||
"fun <T : jet.Any?> f(l : jet.List<jet.Any?>) : jet.Any?");
|
||||
"fun <T> f(l : jet.List<jet.Any?>) : jet.Any?");
|
||||
}
|
||||
|
||||
public void testParameterInBound() throws Exception {
|
||||
doTest("fun <T, R : List<T>> f(l: List<R>): R",
|
||||
"fun <T : jet.Any?, R : jet.List<jet.Any?>> f(l : jet.List<jet.List<jet.Any?>>) : jet.List<jet.Any?>");
|
||||
"fun <T, R : jet.List<jet.Any?>> f(l : jet.List<jet.List<jet.Any?>>) : jet.List<jet.Any?>");
|
||||
}
|
||||
|
||||
public void testWithWhere() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user