KT-1033 Generate implementations produces wrong code

This commit is contained in:
Nikolay Krasko
2012-01-18 12:16:40 +04:00
parent e2782e0766
commit 2a3d1b2b45
10 changed files with 50 additions and 10 deletions
@@ -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
}