resultProperty

private fun resultProperty(value: FirExpression, source: KtSourceElement, packageFqName: FqName): FirProperty

The property holding the snippet's value: value's, the body's last expression under the type it resolved to. A body ending on a statement makes that Unit, and fir2ir then emits the invocation as a plain statement and no property at all — so a snippet has a result exactly when it ends on a value, with nothing here deciding which.

Private keeps the type the value has: from Kotlin 2.4 a public property approximates a local class — every class a snippet declares — to a supertype, Any for most. It is also the rule YieldType renders with, so a single-tick result and a yielded one report alike. The field is read back reflectively either way.