Fix tests: "infix modifier required" and "operator modifier required" errors
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
class S(val a: String, val b: String) {
|
||||
fun component1() : String = a
|
||||
fun component2() : String = b
|
||||
operator fun component1() : String = a
|
||||
operator fun component2() : String = b
|
||||
}
|
||||
|
||||
fun S.component3() = ((a + b) as java.lang.String).substring(2)
|
||||
operator fun S.component3() = ((a + b) as java.lang.String).substring(2)
|
||||
|
||||
class Tester() {
|
||||
fun box() : String {
|
||||
@@ -11,7 +11,7 @@ class Tester() {
|
||||
return o + k + ok + ok2
|
||||
}
|
||||
|
||||
fun S.component4() = ((a + b) as java.lang.String).substring(2)
|
||||
operator fun S.component4() = ((a + b) as java.lang.String).substring(2)
|
||||
}
|
||||
|
||||
fun box() = Tester().box()
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
class A() {
|
||||
|
||||
override fun toString(): String {
|
||||
return "A"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box() : String {
|
||||
|
||||
val s = "1" plus "2" plus 3 plus 4L plus 5.0 plus 6F plus '7' plus A()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
/*TODO:
|
||||
1 NEW java/lang/StringBuilder*/
|
||||
Reference in New Issue
Block a user