Make lateinit diagnostics more clear
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
class A {
|
||||
public lateinit val str: String
|
||||
|
||||
init {
|
||||
str = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
return a.str
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class A {
|
||||
private lateinit val str: String
|
||||
|
||||
init {
|
||||
str = "OK"
|
||||
}
|
||||
|
||||
public fun getMyStr(): String {
|
||||
return str
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
return a.getMyStr()
|
||||
}
|
||||
Reference in New Issue
Block a user