[JVM IR] KTIJ-24335 Require stubbing for built-in symbol deduplication
- Built-in symbol deduplication has only been tested with stubbing enabled. Because there is no current use case for deduplication without stubbing, an exception will be thrown to communicate the misconfiguration.
This commit is contained in:
committed by
Space Team
parent
d1df6391db
commit
e7bf4da796
+9
@@ -86,6 +86,15 @@ open class JvmIrCodegenFactory(
|
||||
IdeCodegenSettings(shouldStubAndNotLinkUnboundSymbols = shouldStubAndNotLinkUnboundSymbols),
|
||||
)
|
||||
|
||||
init {
|
||||
if (ideCodegenSettings.shouldDeduplicateBuiltInSymbols && !ideCodegenSettings.shouldStubAndNotLinkUnboundSymbols) {
|
||||
throw IllegalStateException(
|
||||
"`shouldDeduplicateBuiltInSymbols` depends on `shouldStubAndNotLinkUnboundSymbols` being enabled. Deduplication of" +
|
||||
" built-in symbols hasn't been tested without stubbing and there is currently no use case for it without stubbing."
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param shouldStubOrphanedExpectSymbols See [stubOrphanedExpectSymbols].
|
||||
* @param shouldDeduplicateBuiltInSymbols See [SymbolTableWithBuiltInsDeduplication].
|
||||
|
||||
Reference in New Issue
Block a user