Create from usage: Assume String return type for function whch is called inside of string template

#KT-6083 Fixed
This commit is contained in:
Alexey Sedunov
2015-02-19 14:33:44 +03:00
parent 0ae69e0d3e
commit 41d51e0a13
10 changed files with 93 additions and 10 deletions
@@ -0,0 +1,10 @@
// "Create property 'foo'" "true"
// ERROR: Property must be initialized or be abstract
class A {
val foo: String
}
fun test() {
println("a = ${A().foo}")
}
@@ -0,0 +1,8 @@
// "Create property 'foo'" "true"
// ERROR: Property must be initialized
fun test() {
println("a = $foo")
}
val foo: String
@@ -0,0 +1,8 @@
// "Create property 'foo'" "true"
// ERROR: Property must be initialized or be abstract
class A
fun test() {
println("a = ${A().<caret>foo}")
}
@@ -0,0 +1,6 @@
// "Create property 'foo'" "true"
// ERROR: Property must be initialized
fun test() {
println("a = $<caret>foo")
}