KT-1033 Generate implementations produces wrong code
This commit is contained in:
@@ -4,7 +4,5 @@ trait G<T> {
|
||||
|
||||
class GC() : G<Int> {
|
||||
|
||||
override fun foo(t: Int): Int {
|
||||
return 0
|
||||
}
|
||||
override fun foo(t: Int): Int = 0
|
||||
}
|
||||
|
||||
@@ -2,7 +2,5 @@ import foo.Intf
|
||||
|
||||
class Impl(): Intf {
|
||||
|
||||
override fun getFooBar(): String? {
|
||||
return null
|
||||
}
|
||||
override fun getFooBar(): String? = null
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ import foo.Intf
|
||||
class Impl(): Intf {
|
||||
|
||||
override fun fooBar(i: Int, s: Array<String?>?, foo: Any?) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
trait G<T> {
|
||||
fun foo(t : T) : T
|
||||
}
|
||||
|
||||
class GC<T>() : G<T> {
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
trait G<T> {
|
||||
fun foo(t : T) : T
|
||||
}
|
||||
|
||||
class GC<T>() : G<T> {
|
||||
|
||||
override fun foo(t: T): T {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
trait Some {
|
||||
fun foo(some : Int?) : Int
|
||||
}
|
||||
|
||||
class SomeOther : Some {
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
trait Some {
|
||||
fun foo(some : Int?) : Int
|
||||
}
|
||||
|
||||
class SomeOther : Some {
|
||||
|
||||
override fun foo(some: Int?): Int = 0
|
||||
}
|
||||
Reference in New Issue
Block a user