Analysis API: separate constant values from annotation values
This commit is contained in:
@@ -824,6 +824,9 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
|
||||
+value.toString()
|
||||
+">"
|
||||
}
|
||||
ConstantValueKind.Error -> {
|
||||
+"ERROR_CONSTANT"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -290,6 +290,7 @@ private fun ConstantValueKind<*>.toIrConstKind(): IrConstKind<*> = when (this) {
|
||||
ConstantValueKind.Float -> IrConstKind.Float
|
||||
ConstantValueKind.Double -> IrConstKind.Double
|
||||
ConstantValueKind.IntegerLiteral, ConstantValueKind.UnsignedIntegerLiteral -> throw IllegalArgumentException()
|
||||
ConstantValueKind.Error -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
@@ -128,5 +128,6 @@ fun ConstantValueKind<*>.expectedConeType(session: FirSession): ConeKotlinType {
|
||||
|
||||
ConstantValueKind.IntegerLiteral -> constructLiteralType(StandardClassIds.Int)
|
||||
ConstantValueKind.UnsignedIntegerLiteral -> constructLiteralType(StandardClassIds.UInt)
|
||||
ConstantValueKind.Error -> error("Unexpected error ConstantValueKind")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user