From 3eb3015688f7ef980d324713a6c10a7248ede8fe Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Mon, 4 Oct 2021 15:57:40 +0300 Subject: [PATCH] FIR: Do not fail when trying to apply attributes to stub types --- .../fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt index fdcc60d0919..7db34889bce 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt @@ -116,6 +116,8 @@ fun T.withAttributes(attributes: ConeAttributes, typeSystem // TODO: Consider correct application of attributes to ConeIntersectionType // Currently, ConeAttributes.union works a bit strange, because it lefts only `other` parts is ConeIntersectionType -> this + // Attributes for stub types are not supported, and it's not obvious if it should + is ConeStubType -> this else -> error("Not supported: $this: ${this.render()}") } as T }