[FIR] Do not include transitive friend dependencies in symbol provider
When flattening a dependency FirSymbolProvider, make sure transitive dependency FirSymbolProviders are not included. This requires checking that nested symbol provider sessions match the composite symbol provider session when they are both source sessions. ^KT-60614 Fixed
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
Module: a
|
||||
FILE fqName:a fileName:/a.kt
|
||||
TYPEALIAS name:A visibility:public expandedType:kotlin.String
|
||||
Module: b
|
||||
FILE fqName:b fileName:/b.kt
|
||||
FUN name:foo visibility:public modality:FINAL <> (f:kotlin.Function0<kotlin.String>) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:f index:0 type:kotlin.Function0<kotlin.String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (f: kotlin.Function0<kotlin.String>): kotlin.String declared in b'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 declared in kotlin.Function0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'f: kotlin.Function0<kotlin.String> declared in b.foo' type=kotlin.Function0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
Module: main
|
||||
FILE fqName:<root> fileName:/c.kt
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CALL 'public final fun foo (f: kotlin.Function0<kotlin.String>): kotlin.String declared in b' type=kotlin.String origin=null
|
||||
f: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
|
||||
CONST String type=kotlin.String value="OK"
|
||||
@@ -1,3 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// DUMP_IR
|
||||
// This test checks that unresolved typealias in an abbreviated type does not crash the compiler or result in a compilation error.
|
||||
// Apparently, there's some demand for this behavior, see KT-45308, KT-58335.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user