K2: Add clarification comment to KtFakeSourceElementKind
This commit is contained in:
committed by
Space Team
parent
8ac39dc284
commit
8fa84e7bea
@@ -24,6 +24,14 @@ object KtRealSourceElementKind : KtSourceElementKind() {
|
||||
get() = false
|
||||
}
|
||||
|
||||
/**
|
||||
* When an element has a kind of KtFakeSourceElementKind it means that relevant FIR element was created synthetically.
|
||||
* And while this definition might look a bit vaguely because, e.g. RawFirBuilder might create a lot of "synthetic" things
|
||||
* and not all of them we want to treat as "fake" (like when's created from if's), there is a criteria that ultimately means
|
||||
* that one need to use KtFakeSourceElementKind, and it's the situation when several FIR elements might share the same source element.
|
||||
*
|
||||
* And vice versa, KtRealSourceElementKind means that there's a single FIR node in the resulting tree that has the same source element.
|
||||
*/
|
||||
sealed class KtFakeSourceElementKind(final override val shouldSkipErrorTypeReporting: Boolean = false) : KtSourceElementKind() {
|
||||
// for some fir expression implicit return typeRef is generated
|
||||
// some of them are: break, continue, return, throw, string concat,
|
||||
|
||||
Reference in New Issue
Block a user