Implemented 'lateinit' properties
If property is lateinit, then on each access we need to test its value and throw UninitializedPropertyAccessException if it is null.
This commit is contained in:
@@ -24,6 +24,10 @@ fun ThrowNoWhenBranchMatchedException(): Nothing {
|
||||
throw NoWhenBranchMatchedException()
|
||||
}
|
||||
|
||||
fun ThrowUninitializedPropertyAccessException(): Nothing {
|
||||
throw UninitializedPropertyAccessException()
|
||||
}
|
||||
|
||||
@ExportForCppRuntime
|
||||
internal fun TheEmptyString() = ""
|
||||
|
||||
|
||||
@@ -176,6 +176,15 @@ public open class NoWhenBranchMatchedException : RuntimeException {
|
||||
}
|
||||
}
|
||||
|
||||
public open class UninitializedPropertyAccessException : RuntimeException {
|
||||
|
||||
constructor() : super() {
|
||||
}
|
||||
|
||||
constructor(s: String) : super(s) {
|
||||
}
|
||||
}
|
||||
|
||||
public open class OutOfMemoryError : Error {
|
||||
|
||||
constructor() : super() {
|
||||
|
||||
Reference in New Issue
Block a user