Enforce analysis inside top-level property initializer
Relates to #KT-36460
This commit is contained in:
+4
-1
@@ -1,4 +1,7 @@
|
||||
// OUT_OF_CODE_BLOCK: FALSE
|
||||
// TODO NOTE: [VD] Temporary workaround for KT-36460
|
||||
// SKIP_ANALYZE_CHECK
|
||||
// OUT_OF_CODE_BLOCK: TRUE
|
||||
|
||||
// ERROR: Unresolved reference: a
|
||||
|
||||
interface Some
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
// OUT_OF_CODE_BLOCK: FALSE
|
||||
// TODO NOTE: [VD] Temporary workaround for KT-36460
|
||||
// SKIP_ANALYZE_CHECK
|
||||
// OUT_OF_CODE_BLOCK: TRUE
|
||||
|
||||
// ERROR: This variable must either have a type annotation or be initialized
|
||||
// ERROR: Type mismatch: inferred type is Unit but Int? was expected
|
||||
// ERROR: Type mismatch: inferred type is Unit but Int? was expected
|
||||
|
||||
val test: Int? = if (true) {
|
||||
fun test() {
|
||||
|
||||
+5
-3
@@ -1,8 +1,10 @@
|
||||
// OUT_OF_CODE_BLOCK: FALSE
|
||||
// TODO NOTE: [VD] Temporary workaround for KT-36460
|
||||
// SKIP_ANALYZE_CHECK
|
||||
// OUT_OF_CODE_BLOCK: TRUE
|
||||
|
||||
// Problem with lazy initialization of nullable properties
|
||||
|
||||
// TODO: Investigate
|
||||
// --ERROR: Unresolved reference: q
|
||||
// ERROR: Unresolved reference: a
|
||||
interface Some
|
||||
|
||||
val test: Some? = object: Some {
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// OUT_OF_CODE_BLOCK: FALSE
|
||||
// TODO NOTE: [VD] Temporary workaround for KT-36460
|
||||
// SKIP_ANALYZE_CHECK
|
||||
// OUT_OF_CODE_BLOCK: TRUE
|
||||
|
||||
val test: String = "<caret>"
|
||||
Reference in New Issue
Block a user