[IR] Give generic parameters proper names in IrSymbol-related classes
Single-letter names were very confusing, especially in declarations like
```kotlin
private inline fun <
reified D : IrDeclaration,
reified ES : IrDelegatingSymbol<AS, D, *>,
reified AS : IrBindableSymbol<*, D>
> finalizeExpectActual(
expectSymbol: ES,
actualSymbol: IrSymbol,
noinline actualizer: (e: D, a: D) -> Unit
)
```
This commit is contained in:
committed by
Space Team
parent
88d68f77e5
commit
e473eaa5d6
+8
-6
@@ -286,12 +286,14 @@ abstract class KotlinIrLinker(
|
||||
}
|
||||
}
|
||||
|
||||
private inline fun <
|
||||
reified D : IrDeclaration,
|
||||
reified ES : IrDelegatingSymbol<AS, D, *>,
|
||||
reified AS : IrBindableSymbol<*, D>
|
||||
> finalizeExpectActual(expectSymbol: ES, actualSymbol: IrSymbol, noinline actualizer: (e: D, a: D) -> Unit) {
|
||||
require(actualSymbol is AS)
|
||||
private inline fun <reified Owner, reified DelegatingSymbol, reified DelegateSymbol> finalizeExpectActual(
|
||||
expectSymbol: DelegatingSymbol,
|
||||
actualSymbol: IrSymbol,
|
||||
noinline actualizer: (e: Owner, a: Owner) -> Unit,
|
||||
) where Owner : IrDeclaration,
|
||||
DelegatingSymbol : IrDelegatingSymbol<DelegateSymbol, Owner, *>,
|
||||
DelegateSymbol : IrBindableSymbol<*, Owner> {
|
||||
require(actualSymbol is DelegateSymbol)
|
||||
val expectDeclaration = expectSymbol.owner
|
||||
val actualDeclaration = actualSymbol.owner
|
||||
actualizer(expectDeclaration, actualDeclaration)
|
||||
|
||||
Reference in New Issue
Block a user