[LL API] Analyze code fragment in a separate 'FirSession'
Before, `KtCodeFragment`/`FirCodeFragment` was analyzed as a part of its context `KtModule`. This has the following complications: - In non-source sessions, diagnostic reporting is globally disabled. For code fragments, however, checking the code before passing it to the backend is essential. - Special treatment for call ambiguities in libraries (`LLLibraryScopeAwareCallConflictResolverFactory`) becomes complicated as the conflict resolver has to be applied to a library module. - `KtCodeFragment`s usually have a shorter lifetime than their own context. Caching may potentially be implemented differently for them. ^KT-61783 Fixed
This commit is contained in:
+1
-1
@@ -9,4 +9,4 @@ MODULE_FRAGMENT
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public final fun call (): kotlin.Unit declared in <root>.Foo' type=kotlin.Unit origin=null
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Foo
|
||||
$this: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Foo
|
||||
|
||||
+1
@@ -1 +1,2 @@
|
||||
@Suppress("INVISIBLE_SETTER")
|
||||
a = "bar"
|
||||
Reference in New Issue
Block a user