@@ -92,7 +92,7 @@ public abstract class OverrideImplementMethodsHandler implements LanguageCodeIns
|
|||||||
else {
|
else {
|
||||||
bodyBuilder.append("val ");
|
bodyBuilder.append("val ");
|
||||||
}
|
}
|
||||||
bodyBuilder.append(descriptor.getName()).append(": ").append(descriptor.getType());
|
bodyBuilder.append(descriptor.getName()).append(" : ").append(descriptor.getType());
|
||||||
ImportClassHelper.addImportDirectiveIfNeeded(descriptor.getType(), file);
|
ImportClassHelper.addImportDirectiveIfNeeded(descriptor.getType(), file);
|
||||||
String initializer = defaultInitializer(descriptor.getType(), JetStandardLibrary.getInstance());
|
String initializer = defaultInitializer(descriptor.getType(), JetStandardLibrary.getInstance());
|
||||||
if (initializer != null) {
|
if (initializer != null) {
|
||||||
@@ -115,7 +115,7 @@ public abstract class OverrideImplementMethodsHandler implements LanguageCodeIns
|
|||||||
}
|
}
|
||||||
first = false;
|
first = false;
|
||||||
bodyBuilder.append(parameterDescriptor.getName());
|
bodyBuilder.append(parameterDescriptor.getName());
|
||||||
bodyBuilder.append(": ");
|
bodyBuilder.append(" : ");
|
||||||
bodyBuilder.append(parameterDescriptor.getType().toString());
|
bodyBuilder.append(parameterDescriptor.getType().toString());
|
||||||
|
|
||||||
ImportClassHelper.addImportDirectiveIfNeeded(parameterDescriptor.getType(), file);
|
ImportClassHelper.addImportDirectiveIfNeeded(parameterDescriptor.getType(), file);
|
||||||
@@ -124,7 +124,7 @@ public abstract class OverrideImplementMethodsHandler implements LanguageCodeIns
|
|||||||
final JetType returnType = descriptor.getReturnType();
|
final JetType returnType = descriptor.getReturnType();
|
||||||
final JetStandardLibrary stdlib = JetStandardLibrary.getInstance();
|
final JetStandardLibrary stdlib = JetStandardLibrary.getInstance();
|
||||||
if (!returnType.equals(stdlib.getTuple0Type())) {
|
if (!returnType.equals(stdlib.getTuple0Type())) {
|
||||||
bodyBuilder.append(": ").append(returnType.toString());
|
bodyBuilder.append(" : ").append(returnType.toString());
|
||||||
ImportClassHelper.addImportDirectiveIfNeeded(returnType, file);
|
ImportClassHelper.addImportDirectiveIfNeeded(returnType, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ class SomeOther<S> : Some<S> {
|
|||||||
override fun someFoo() {
|
override fun someFoo() {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
override fun someGenericFoo(): S {
|
override fun someGenericFoo() : S {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
override fun someOtherFoo(): Int {
|
override fun someOtherFoo() : Int {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ trait G<T> {
|
|||||||
|
|
||||||
class GC() : G<Int> {
|
class GC() : G<Int> {
|
||||||
|
|
||||||
override fun foo(t: Int): Int {
|
override fun foo(t : Int) : Int {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import foo.Intf
|
|||||||
|
|
||||||
class Impl(): Intf {
|
class Impl(): Intf {
|
||||||
|
|
||||||
override fun getFooBar(): String? {
|
override fun getFooBar() : String? {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import foo.Intf
|
|||||||
|
|
||||||
class Impl(): Intf {
|
class Impl(): Intf {
|
||||||
|
|
||||||
override fun fooBar(i: Int, s: Array<String?>?, foo: Any?) {
|
override fun fooBar(i : Int, s : Array<String?>?, foo : Any?) {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ trait T {
|
|||||||
|
|
||||||
class GC() : T {
|
class GC() : T {
|
||||||
|
|
||||||
override val v: Int = 0
|
override val v : Int = 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ trait G<T> {
|
|||||||
|
|
||||||
class GC<T>() : G<T> {
|
class GC<T>() : G<T> {
|
||||||
|
|
||||||
override fun foo(t: T): T {
|
override fun foo(t : T) : T {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ trait Some {
|
|||||||
|
|
||||||
class SomeOther : Some {
|
class SomeOther : Some {
|
||||||
|
|
||||||
override fun foo(some: Int?): Int {
|
override fun foo(some : Int?) : Int {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user