[Low Level FIR] fix exception when creating symbol by invalid code

This commit is contained in:
Ilya Kirillov
2022-10-02 13:07:20 +02:00
committed by teamcity
parent 24bf273b93
commit 49f2f85927
29 changed files with 553 additions and 39 deletions
@@ -0,0 +1,3 @@
KtErrorCallInfo:
candidateCalls = []
diagnostic = ERROR<ASSIGNMENT_IN_EXPRESSION_CONTEXT: Assignments are not expressions, and only expressions are allowed in this context>
@@ -1,3 +1,3 @@
KtErrorCallInfo:
candidateCalls = []
diagnostic = ERROR<ASSIGNMENT_IN_EXPRESSION_CONTEXT: Assignments are not expressions, and only expressions are allowed in this context>
diagnostic = ERROR<VARIABLE_EXPECTED: Variable expected>
@@ -0,0 +1,7 @@
private val _commonSettingsLazy: A = null = <expr>object : A<Int> {
override fun x() {}
}</expr>
interface A<T> {
fun x()
}
@@ -0,0 +1 @@
object : A<kotlin.Int>
@@ -0,0 +1,13 @@
KtAnonymousObjectSymbol:
annotationsList: []
classIdIfNonLocal: null
classKind: ANONYMOUS_OBJECT
name: null
origin: SOURCE
superTypes: [
A<kotlin/Int>
]
symbolKind: LOCAL
typeParameters: []
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
@@ -0,0 +1 @@
object<LanguageVersionSettings>
@@ -0,0 +1,3 @@
private val commonSettingsLazy = <expr>object A<LanguageVersionSettings> {
println(x)
}</expr>
@@ -0,0 +1,13 @@
KtAnonymousObjectSymbol:
annotationsList: []
classIdIfNonLocal: null
classKind: ANONYMOUS_OBJECT
name: null
origin: SOURCE
superTypes: [
kotlin/Any
]
symbolKind: LOCAL
typeParameters: []
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null