java classes should extend java.lang.Object
#KT-1121 fixed
This commit is contained in:
+29
-4
@@ -356,6 +356,15 @@ public class JavaDescriptorResolver {
|
||||
|
||||
|
||||
|
||||
@Nullable
|
||||
private ClassDescriptor resolveJavaLangObject() {
|
||||
ClassDescriptor clazz = resolveClass(JdkNames.JL_OBJECT.getFqName(), DescriptorSearchRule.IGNORE_IF_FOUND_IN_KOTLIN);
|
||||
if (clazz == null) {
|
||||
// TODO: warning
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ClassDescriptor resolveClass(@NotNull FqName qualifiedName, @NotNull DescriptorSearchRule searchRule) {
|
||||
List<Runnable> tasks = Lists.newArrayList();
|
||||
@@ -466,7 +475,7 @@ public class JavaDescriptorResolver {
|
||||
"class " + psiClass.getQualifiedName());
|
||||
|
||||
// TODO: ugly hack: tests crash if initializeTypeParameters called with class containing proper supertypes
|
||||
supertypes.addAll(getSupertypes(new PsiClassWrapper(psiClass), classData.classDescriptor, classData.getTypeParameters()));
|
||||
supertypes.addAll(getSupertypes(new PsiClassWrapper(psiClass), classData, classData.getTypeParameters()));
|
||||
|
||||
PsiMethod[] psiConstructors = psiClass.getConstructors();
|
||||
|
||||
@@ -599,7 +608,7 @@ public class JavaDescriptorResolver {
|
||||
|
||||
classDescriptorCache.put(fqName, classData);
|
||||
|
||||
classData.classDescriptor.setSupertypes(getSupertypes(new PsiClassWrapper(classObjectPsiClass), classData.classDescriptor, new ArrayList<TypeParameterDescriptor>(0)));
|
||||
classData.classDescriptor.setSupertypes(getSupertypes(new PsiClassWrapper(classObjectPsiClass), classData, new ArrayList<TypeParameterDescriptor>(0)));
|
||||
classData.classDescriptor.setName(JetPsiUtil.NO_NAME_PROVIDED); // TODO
|
||||
classData.classDescriptor.setModality(Modality.FINAL);
|
||||
classData.classDescriptor.setVisibility(containing.getVisibility());
|
||||
@@ -862,7 +871,9 @@ public class JavaDescriptorResolver {
|
||||
}
|
||||
}
|
||||
|
||||
private Collection<JetType> getSupertypes(PsiClassWrapper psiClass, ClassDescriptor classDescriptor, List<TypeParameterDescriptor> typeParameters) {
|
||||
private Collection<JetType> getSupertypes(PsiClassWrapper psiClass, ResolverBinaryClassData classData, List<TypeParameterDescriptor> typeParameters) {
|
||||
ClassDescriptor classDescriptor = classData.classDescriptor;
|
||||
|
||||
final List<JetType> result = new ArrayList<JetType>();
|
||||
|
||||
String context = "class " + psiClass.getQualifiedName();
|
||||
@@ -908,7 +919,21 @@ public class JavaDescriptorResolver {
|
||||
}
|
||||
|
||||
if (result.isEmpty()) {
|
||||
result.add(JetStandardClasses.getAnyType());
|
||||
if (classData.kotlin
|
||||
|| psiClass.getQualifiedName().equals(JdkNames.JL_OBJECT.getFqName().getFqName())
|
||||
// TODO: annotations
|
||||
|| classDescriptor.getKind() == ClassKind.ANNOTATION_CLASS) {
|
||||
result.add(JetStandardClasses.getAnyType());
|
||||
}
|
||||
else {
|
||||
ClassDescriptor object = resolveJavaLangObject();
|
||||
if (object != null) {
|
||||
result.add(object.getDefaultType());
|
||||
}
|
||||
else {
|
||||
result.add(JetStandardClasses.getAnyType());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2010-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.java;
|
||||
|
||||
/**
|
||||
* @author Stepan Koltsov
|
||||
*/
|
||||
public class JdkNames {
|
||||
|
||||
public static final JvmClassName JL_OBJECT = new JvmClassName("java.lang.Object");
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package test
|
||||
|
||||
class ClassWithTypeParameter<erased P>() {
|
||||
class ClassWithTypeParameter<erased P>() : java.lang.Object() {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace test
|
||||
|
||||
final class test.ClassWithTypeParameter</*0*/ P : jet.Any?> : jet.Any {
|
||||
final class test.ClassWithTypeParameter</*0*/ P : jet.Any?> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : jet.Any?><init>(): test.ClassWithTypeParameter<P>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package test
|
||||
|
||||
class ClassWithTypeParameter<erased P, erased Q : P>() {
|
||||
class ClassWithTypeParameter<erased P, erased Q : P>() : java.lang.Object() {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace test
|
||||
|
||||
final class test.ClassWithTypeParameter</*0*/ P : jet.Any?, /*1*/ Q : P> : jet.Any {
|
||||
final class test.ClassWithTypeParameter</*0*/ P : jet.Any?, /*1*/ Q : P> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : jet.Any?, /*1*/ Q : P><init>(): test.ClassWithTypeParameter<P, Q>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package test
|
||||
|
||||
class ClassWithTypePRefSelf<erased P : java.lang.Enum<P>?>() {
|
||||
class ClassWithTypePRefSelf<erased P : java.lang.Enum<P>?>() : java.lang.Object() {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace test
|
||||
|
||||
final class test.ClassWithTypePRefSelf</*0*/ P : java.lang.Enum<P>?> : jet.Any {
|
||||
final class test.ClassWithTypePRefSelf</*0*/ P : java.lang.Enum<P>?> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : java.lang.Enum<P>?><init>(): test.ClassWithTypePRefSelf<P>
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class FieldAsVar() {
|
||||
class FieldAsVar() : java.lang.Object() {
|
||||
var f: Int = 1
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
final class test.FieldAsVar : jet.Any {
|
||||
final class test.FieldAsVar : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.FieldAsVar
|
||||
final var f: jet.Int
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
open class FieldOfArrayType() {
|
||||
open class FieldOfArrayType() : java.lang.Object() {
|
||||
var files: Array<java.io.File?>? = null
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.FieldOfArrayType : jet.Any {
|
||||
open class test.FieldOfArrayType : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.FieldOfArrayType
|
||||
final var files: jet.Array<java.io.File?>?
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class FinalFieldAsVal() {
|
||||
class FinalFieldAsVal() : java.lang.Object() {
|
||||
val f: Int = 1
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
final class test.FinalFieldAsVal : jet.Any {
|
||||
final class test.FinalFieldAsVal : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.FinalFieldAsVal
|
||||
final val f: jet.Int
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
open class Outer() {
|
||||
open class Inner()
|
||||
open class Outer() : java.lang.Object() {
|
||||
open class Inner() : java.lang.Object()
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
namespace test
|
||||
|
||||
open class test.Outer : jet.Any {
|
||||
open class test.Outer : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.Outer
|
||||
open class test.Outer.Inner : jet.Any {
|
||||
open class test.Outer.Inner : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.Outer.Inner
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
open class Outer<erased P>() {
|
||||
open class Inner<erased Q : P>()
|
||||
open class Outer<erased P>() : java.lang.Object() {
|
||||
open class Inner<erased Q : P>() : java.lang.Object()
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
namespace test
|
||||
|
||||
open class test.Outer</*0*/ P : jet.Any?> : jet.Any {
|
||||
open class test.Outer</*0*/ P : jet.Any?> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : jet.Any?><init>(): test.Outer<P>
|
||||
open class test.Outer.Inner</*0*/ Q : P> : jet.Any {
|
||||
open class test.Outer.Inner</*0*/ Q : P> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ Q : P><init>(): test.Outer.Inner<Q>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package test
|
||||
|
||||
trait Trait<erased P>
|
||||
trait Trait<erased P> : java.lang.Object
|
||||
|
||||
open class Outer<erased P, erased Q>() {
|
||||
open class Inner() {
|
||||
open class Outer<erased P, erased Q>() : java.lang.Object() {
|
||||
open class Inner() : java.lang.Object() {
|
||||
}
|
||||
|
||||
open class Inner2() : Inner(), Trait<P> {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
namespace test
|
||||
|
||||
open class test.Outer</*0*/ P : jet.Any?, /*1*/ Q : jet.Any?> : jet.Any {
|
||||
open class test.Outer</*0*/ P : jet.Any?, /*1*/ Q : jet.Any?> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : jet.Any?, /*1*/ Q : jet.Any?><init>(): test.Outer<P, Q>
|
||||
open class test.Outer.Inner : jet.Any {
|
||||
open class test.Outer.Inner : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.Outer.Inner
|
||||
}
|
||||
open class test.Outer.Inner2 : test.Outer.Inner, test.Trait<P> {
|
||||
final /*constructor*/ fun <init>(): test.Outer.Inner2
|
||||
}
|
||||
}
|
||||
abstract trait test.Trait</*0*/ P : jet.Any?> : jet.Any {
|
||||
abstract trait test.Trait</*0*/ P : jet.Any?> : java.lang.Object {
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package test
|
||||
|
||||
class Outer<erased P>() {
|
||||
class Inner() {
|
||||
class Outer<erased P>() : java.lang.Object() {
|
||||
class Inner() : java.lang.Object() {
|
||||
fun f<erased Q : P>() {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
namespace test
|
||||
|
||||
final class test.Outer</*0*/ P : jet.Any?> : jet.Any {
|
||||
final class test.Outer</*0*/ P : jet.Any?> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : jet.Any?><init>(): test.Outer<P>
|
||||
final class test.Outer.Inner : jet.Any {
|
||||
final class test.Outer.Inner : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.Outer.Inner
|
||||
final fun </*0*/ Q : P>f(): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class MethodWithTypeP() {
|
||||
class MethodWithTypeP() : java.lang.Object() {
|
||||
fun <erased P> f() = #()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
final class test.MethodWithTypeP : jet.Any {
|
||||
final class test.MethodWithTypeP : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.MethodWithTypeP
|
||||
final fun </*0*/ P : jet.Any?>f(): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
class MethodWithTypePP() {
|
||||
class MethodWithTypePP() : java.lang.Object() {
|
||||
fun <erased P, erased Q : P> f() = #()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
final class test.MethodWithTypePP : jet.Any {
|
||||
final class test.MethodWithTypePP : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.MethodWithTypePP
|
||||
final fun </*0*/ P : jet.Any?, /*1*/ Q : P>f(): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
open class MethodWithTypePRefClassP<erased P>() {
|
||||
open class MethodWithTypePRefClassP<erased P>() : java.lang.Object() {
|
||||
fun <erased Q : P> f() = #()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.MethodWithTypePRefClassP</*0*/ P : jet.Any?> : jet.Any {
|
||||
open class test.MethodWithTypePRefClassP</*0*/ P : jet.Any?> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : jet.Any?><init>(): test.MethodWithTypePRefClassP<P>
|
||||
final fun </*0*/ Q : P>f(): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
final class MethosWithPRefTP() {
|
||||
final class MethosWithPRefTP() : java.lang.Object() {
|
||||
fun <erased P> f(p0: P?) = #()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
final class test.MethosWithPRefTP : jet.Any {
|
||||
final class test.MethosWithPRefTP : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.MethosWithPRefTP
|
||||
final fun </*0*/ P : jet.Any?>f(/*0*/ p0: P?): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
open class MyException(p0: String?, p1: Throwable?)
|
||||
open class MyException(p0: String?, p1: Throwable?) : java.lang.Object()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace test
|
||||
|
||||
open class test.MyException : jet.Any {
|
||||
open class test.MyException : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(/*0*/ p0: jet.String?, /*1*/ p1: jet.Throwable?): test.MyException
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
class Simple()
|
||||
class Simple() : java.lang.Object()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace test
|
||||
|
||||
final class test.Simple : jet.Any {
|
||||
final class test.Simple : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.Simple
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
class TwoFields() {
|
||||
class TwoFields() : java.lang.Object() {
|
||||
var a: Int = 1
|
||||
var b: Short = 2;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
final class test.TwoFields : jet.Any {
|
||||
final class test.TwoFields : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.TwoFields
|
||||
final var a: jet.Int
|
||||
final var b: jet.Short
|
||||
|
||||
@@ -2,6 +2,6 @@ package test
|
||||
|
||||
annotation class Aaa
|
||||
|
||||
open class HasAnnotatedMethod() {
|
||||
open class HasAnnotatedMethod() : java.lang.Object() {
|
||||
open Aaa fun f(): Unit { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.HasAnnotatedMethod : jet.Any {
|
||||
open class test.HasAnnotatedMethod : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.HasAnnotatedMethod
|
||||
open test.Aaa() fun f(): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
open class DifferentGetterAndSetter() {
|
||||
open class DifferentGetterAndSetter() : java.lang.Object() {
|
||||
open fun setSomething(p0: String?): Unit { }
|
||||
open fun getSomething() = 17
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.DifferentGetterAndSetter : jet.Any {
|
||||
open class test.DifferentGetterAndSetter : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.DifferentGetterAndSetter
|
||||
open fun getSomething(): jet.Int
|
||||
open fun setSomething(/*0*/ p0: jet.String?): jet.Tuple0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
trait JavaBeanAbstractGetter {
|
||||
trait JavaBeanAbstractGetter : java.lang.Object {
|
||||
//final val red: Int
|
||||
abstract fun getRed(): Int
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace test
|
||||
|
||||
abstract trait test.JavaBeanAbstractGetter : jet.Any {
|
||||
abstract trait test.JavaBeanAbstractGetter : java.lang.Object {
|
||||
abstract fun getRed(): jet.Int
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
open class JavaBeanVal() {
|
||||
open class JavaBeanVal() : java.lang.Object() {
|
||||
open fun getColor(): String? = ""
|
||||
//val color: String? = ""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.JavaBeanVal : jet.Any {
|
||||
open class test.JavaBeanVal : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.JavaBeanVal
|
||||
open fun getColor(): jet.String?
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
open class JavaBeanVal() {
|
||||
open class JavaBeanVal() : java.lang.Object() {
|
||||
open fun getColor(): String? = ""
|
||||
open fun setColor(p0: String?): Unit { }
|
||||
//var color: String? = ""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.JavaBeanVal : jet.Any {
|
||||
open class test.JavaBeanVal : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.JavaBeanVal
|
||||
open fun getColor(): jet.String?
|
||||
open fun setColor(/*0*/ p0: jet.String?): jet.Tuple0
|
||||
|
||||
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
open class JavaBeanVarOfGenericType<erased P> {
|
||||
open class JavaBeanVarOfGenericType<erased P>() : java.lang.Object() {
|
||||
open fun getCharacters(): ArrayList<P>? = null
|
||||
open fun setCharacters(p0: ArrayList<P>?) { }
|
||||
//var characters: ArrayList<P>? = null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.JavaBeanVarOfGenericType</*0*/ P : jet.Any?> : jet.Any {
|
||||
open class test.JavaBeanVarOfGenericType</*0*/ P : jet.Any?> : java.lang.Object {
|
||||
final /*constructor*/ fun </*0*/ P : jet.Any?><init>(): test.JavaBeanVarOfGenericType<P>
|
||||
open fun getCharacters(): java.util.ArrayList<P>?
|
||||
open fun setCharacters(/*0*/ p0: java.util.ArrayList<P>?): jet.Tuple0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
open class TwoSetters() {
|
||||
open class TwoSetters() : java.lang.Object() {
|
||||
open fun setSize(p0: String?) { }
|
||||
open fun setSize(p0: Int) { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.TwoSetters : jet.Any {
|
||||
open class test.TwoSetters : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.TwoSetters
|
||||
open fun setSize(/*0*/ p0: jet.Int): jet.Tuple0
|
||||
open fun setSize(/*0*/ p0: jet.String?): jet.Tuple0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test;
|
||||
|
||||
open class NotNullField() {
|
||||
open class NotNullField() : java.lang.Object() {
|
||||
var hi: String = "";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.NotNullField : jet.Any {
|
||||
open class test.NotNullField : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.NotNullField
|
||||
final var hi: jet.String
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
open class NotNullMethod() {
|
||||
open class NotNullMethod() : java.lang.Object() {
|
||||
open fun hi(): String = ""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.NotNullMethod : jet.Any {
|
||||
open class test.NotNullMethod : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.NotNullMethod
|
||||
open fun hi(): jet.String
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
open class NotNullParameter() {
|
||||
open class NotNullParameter() : java.lang.Object() {
|
||||
open fun hi(p0: String): Unit { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace test
|
||||
|
||||
open class test.NotNullParameter : jet.Any {
|
||||
open class test.NotNullParameter : java.lang.Object {
|
||||
final /*constructor*/ fun <init>(): test.NotNullParameter
|
||||
open fun hi(/*0*/ p0: jet.String): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public inline fun <T> comparator(vararg functions: Function1<T,Any?>): Comparato
|
||||
|
||||
private class FunctionComparator<T>(val functions: Array<Function1<T,Any?>>): Comparator<T> {
|
||||
|
||||
public fun toString(): String {
|
||||
public override fun toString(): String {
|
||||
return "FunctionComparator${functions.toList()}"
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public inline fun <T> comparator(fn: (T,T) -> Int): Comparator<T> {
|
||||
}
|
||||
private class Function2Comparator<T>(val compareFn: (T,T) -> Int): Comparator<T> {
|
||||
|
||||
public fun toString(): String {
|
||||
public override fun toString(): String {
|
||||
return "Function2Comparator${compareFn}"
|
||||
}
|
||||
|
||||
@@ -89,4 +89,4 @@ private class Function2Comparator<T>(val compareFn: (T,T) -> Int): Comparator<T
|
||||
public override fun equals(obj: Any?): Boolean {
|
||||
return this == obj
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user