What is the difference between `IrSimpleFunction` ...
# compiler
j
What is the difference between
IrSimpleFunction
and
IrFunction
? I don’t know, except that
IrSimpleFunction
inherits from
IrFunction
and has more properties. I’m confused about whether to choose
IrSimpleFunction
or
IrFunction
. I referenced Tóth István Zoltán’s answer from 3 months ago (thanks!),
visitSimpleFunction
it restricts the function type you visit to
IrSimpleFunction
, it calls
visitFunction
if not overridden so it is almost the same as
visitFunction
but leaves out non-simple functions such as constructors.
https://kotlinlang.slack.com/archives/C7L3JB43G/p1693196602086569?thread_ts=1693111695.756429&cid=C7L3JB43G
but I still don’t understand what
IrSimpleFunction
considers “simple”.
d
There are two kinds of functions in IR: regular (simple) functions and constructors
👏 1
j
Wow... That's a really short and perfect explanation, thank you!
👌 2