[IR] Forbid unbound type parameters
This commit is contained in:
+2
-1
@@ -31,6 +31,8 @@ class ExternalDependenciesGenerator(val symbolTable: SymbolTable, private val ir
|
|||||||
/*
|
/*
|
||||||
Deserializing a reference may lead to new unbound references, so we loop until none are left.
|
Deserializing a reference may lead to new unbound references, so we loop until none are left.
|
||||||
*/
|
*/
|
||||||
|
require(symbolTable.unboundTypeParameters.isEmpty()) { "Unbound type parameters are forbidden" }
|
||||||
|
|
||||||
lateinit var unbound: List<IrSymbol>
|
lateinit var unbound: List<IrSymbol>
|
||||||
do {
|
do {
|
||||||
unbound = symbolTable.allUnbound
|
unbound = symbolTable.allUnbound
|
||||||
@@ -57,7 +59,6 @@ private val SymbolTable.allUnbound: List<IrSymbol>
|
|||||||
r.addAll(unboundFields)
|
r.addAll(unboundFields)
|
||||||
r.addAll(unboundSimpleFunctions)
|
r.addAll(unboundSimpleFunctions)
|
||||||
r.addAll(unboundProperties)
|
r.addAll(unboundProperties)
|
||||||
r.addAll(unboundTypeParameters)
|
|
||||||
r.addAll(unboundTypeAliases)
|
r.addAll(unboundTypeAliases)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user