Is there documentation for what each type in the c...
# compiler
c
Is there documentation for what each type in the compiler does? For example: what a
FirReference
signifies?
d
There is a very little doc, but it doesn't explain much. Moreover, it says the following: > There are no docs about all possible FirElements yet, but you can explore them in compiler code. Most classes for FIR elements are auto generated and written with all possible members explicitly declared, so they are easy to understand.
Regarding your example:
FirReference
represents the reference from some expression to some declaration. E.g. in the following code
Copy code
fun foo() {} // (1)

fun test() {
    foo()
}
there is a function call
foo()
which • before resolution references to something called
foo
, which is represented by
FirSimpleNamedReference
• after resolution, when the compiler understood that the function
(1)
is called, the reference in the
FirFunctionCall
is replaced with
FirResolvedNamedReference
, which contains the symbol of the function
(1)