Fix tests: "infix modifier required" and "operator modifier required" errors

This commit is contained in:
Yan Zhulanow
2015-11-26 15:56:56 +03:00
parent a3ff3ffc45
commit 9d1af5a17e
635 changed files with 1283 additions and 1617 deletions
@@ -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()
@@ -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()
@@ -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
@@ -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
@@ -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>()
}