FIR light builder: use type reference node as FirTypeRef source

This commit is contained in:
Mikhail Glukhikh
2020-11-24 10:52:16 +03:00
parent d5f17ea41c
commit 12726cd366
@@ -1712,7 +1712,8 @@ class DeclarationsConverter(
if (identifier == null)
return buildErrorTypeRef { diagnostic = ConeSimpleDiagnostic("Incomplete user type", DiagnosticKind.Syntax) }
val theSource = userType.toFirSourceElement()
// Note: we take TYPE_REFERENCE, not USER_TYPE, as the source (to be consistent with RawFirBuilder)
val theSource = tree.getParent(userType)!!.toFirSourceElement()
val qualifierPart = FirQualifierPartImpl(
identifier.nameAsSafeName(),
FirTypeArgumentListImpl(theSource).apply {