Change Signature: Do not add default values to parameters of overriding functions

#KT-6160 Fixed
This commit is contained in:
Alexey Sedunov
2014-11-14 13:27:45 +03:00
parent d597c98445
commit 5bfdb8ee60
10 changed files with 118 additions and 57 deletions
@@ -0,0 +1,18 @@
trait T {
fun foo(a: Int = 1,
b: String = "2")
}
open class A: T {
override fun foo(a: Int,
b: String) {
throw UnsupportedOperationException()
}
}
class B: A() {
override fun foo(a: Int,
b: String) {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,18 @@
trait T {
fun <caret>foo(b: String = "2",
a: Int = 1)
}
open class A: T {
override fun foo(b: String,
a: Int) {
throw UnsupportedOperationException()
}
}
class B: A() {
override fun foo(b: String,
a: Int) {
throw UnsupportedOperationException()
}
}