efftp icon indicating copy to clipboard operation
efftp copied to clipboard

Lazy Vals get an effect annotation

Open lrytz opened this issue 12 years ago • 1 comments

It's probably a bad idea to put the effect on the lazy val type - it's the only place where a value has an effect annotation, and this is exactly what we try to avoid (in pluginsTyped we remove all effect annotations from terms).

Having effect annotations on values leads to all random interactions with the typer, because terms suddenly have effects, which triggers the annotationChecker.

Alternative to putting the effect on the lazy val type: put it as an attachment in the symbol. That might not work across separate compilation though.

Maybe we can put it inside another annotation which is not a TypeConstraint (@lazyValEffect(...)).

lrytz avatar May 09 '13 12:05 lrytz

however, for override checking it might be good to have them on the return type?

lrytz avatar Jun 24 '13 07:06 lrytz