Fix tests: "infix modifier required" and "operator modifier required" errors
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ val Int.testExtVal: Int get() = 1
|
||||
val testDelVal by Delegate()
|
||||
|
||||
class Delegate {
|
||||
fun getValue(a: Any?, b: KProperty<*>) = 1
|
||||
operator fun getValue(a: Any?, b: KProperty<*>) = 1
|
||||
}
|
||||
|
||||
// EXPRESSION: TestClass().testFun()
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
fun f1(i: Int, s: String) = i + s.length()
|
||||
fun Int.f2(s: String) = this + s.length()
|
||||
infix fun Int.f2(s: String) = this + s.length()
|
||||
|
||||
class MyClass {
|
||||
fun f1(i: Int, s: String) = i + s.length()
|
||||
|
||||
Vendored
+2
-2
@@ -15,11 +15,11 @@ class A {
|
||||
}
|
||||
|
||||
class MyDelegate {
|
||||
fun getValue(t: Any?, p: KProperty<*>): Int = 1
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
|
||||
}
|
||||
|
||||
class MyDelegateThrowsException {
|
||||
fun getValue(t: Any?, p: KProperty<*>): Int = throw IllegalStateException()
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int = throw IllegalStateException()
|
||||
}
|
||||
|
||||
// PRINT_FRAME
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ class A {
|
||||
}
|
||||
|
||||
class MyDelegate {
|
||||
fun getValue(t: Any?, p: KProperty<*>): Int = 1
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
|
||||
}
|
||||
|
||||
// RENDER_DELEGATED_PROPERTIES: false
|
||||
|
||||
+2
-2
@@ -4,11 +4,11 @@ fun main(args: Array<String>) {
|
||||
test<Int>()
|
||||
}
|
||||
|
||||
fun foo<U>(): Int {
|
||||
fun <U> foo(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
fun test<T>() {
|
||||
fun <T> test() {
|
||||
//Breakpoint!
|
||||
val a = foo<T>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user