implementation of record constructor auto-initialization [was Re: instance initializer]

Brian Goetz brian.goetz at oracle.com
Fri Sep 6 14:45:01 UTC 2019


> Actually - not sure - what do you mean by "exit path"? We clearly can't have "returns" here. And, if we "throw" then we don't care much about initializing.
> 
> 

Returns are exactly what I was concerned about; currently return is allowed, though weird, in ctors.

If you want to say “no return in compact ctor”, that’s a reasonable simplification (though we’ll battle this beast again later when we want to expand some of the compact-ctor goodies to more general class constructors.)  



More information about the amber-dev mailing list