Support property accessor in inline checks

This commit is contained in:
Mikhael Bogdanov
2016-06-21 11:12:13 +03:00
parent 2cc177255f
commit d524a34fc7
6 changed files with 47 additions and 9 deletions
@@ -0,0 +1,20 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE -INFIX_MODIFIER_REQUIRED
inline var value: (p: Int) -> String
get() = {"123" }
set(s: (p: Int) -> String) {
s(11)
s.invoke(11)
s invoke 11
val z = <!USAGE_IS_NOT_INLINABLE!>s<!>
}
inline var value2: Int.(p: Int) -> String
get() = {"123" }
set(ext: Int.(p: Int) -> String) {
11.ext(11)
11.ext(11)
val p = <!USAGE_IS_NOT_INLINABLE!>ext<!>
}
@@ -0,0 +1,4 @@
package
public var value: (kotlin.Int) -> kotlin.String
public var value2: kotlin.Int.(kotlin.Int) -> kotlin.String