K2: Introduce new FIR node kind FirFromMissingDependenciesNamedReference

The basic idea is that during deserialization/loading compiled
Java classes, there might be some of the dependencies absent that
are referenced from enum arguments in annotations.

Such situation is not considered as totally ill-formed, thus supporting
it, allowing to read the names of mentioned in the annotation argument
might be useful for Java enhancement

^KT-56656 In Progress
This commit is contained in:
Denis.Zharkov
2023-03-13 18:07:30 +01:00
committed by Space Team
parent 157c260fda
commit 955b8e1490
10 changed files with 129 additions and 2 deletions
@@ -156,6 +156,7 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
val namedReference by element(Reference, reference)
val namedReferenceWithCandidateBase by element(Reference, namedReference)
val errorNamedReference by element(Reference, namedReference, diagnosticHolder)
val fromMissingDependenciesNamedReference by element(Reference, namedReference)
val superReference by element(Reference, reference)
val thisReference by element(Reference, reference)
val controlFlowGraphReference by element(Reference, reference)
@@ -499,6 +499,8 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
default("name", "Name.special(\"<\${diagnostic.reason}>\")")
}
impl(fromMissingDependenciesNamedReference)
impl(breakExpression) {
defaultTypeRefWithSource("FirImplicitNothingTypeRef")
useTypes(implicitNothingTypeRefType)
@@ -650,5 +652,3 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
}
}
}