Closed vkuncak closed 9 months ago
What a strange error, I've checked against an older commit and the same error appears, at least it's not from #1476...
The intention of having user-defined change blocks using inline seems doomed, but it helped uncover this.
Trying to make things ghost
also confused me. It seems that marking an entire class ghost
does not make its mutable fields ghost, but only methods defined in it (if any)? Do we have examples of people putting ghost
on a class?
changeMyClass
is annotated with @ghost
here because it is "an erased value or an erased inline method or field" according to the doc of isEffectivelyErased
.
This check has been added here when we could use erased
as a replacement for @ghost
. Note that this check to isEffectivelyErased
has no equivalent in the Scala 2 frontend.
I think it is safe to allow inline
method, since this check was surely meant to only include erased
.
It seems useful to make use of inline functions and assume they will be mostly taken care by Scala compiler.
Do we expect that something like this should work, or do we wish that the inline function is treated as a function?
In any case, currently it reports