@@ -1094,7 +1094,7 @@ object Semantic {
10941094
10951095 /** Utility definition used for better error-reporting of argument errors */
10961096 case class ArgInfo (value : Value , source : Tree ) {
1097- def promote : Contextual [Unit ] = value.promote(" Cannot prove the argument is fully initialized." , source)
1097+ def promote : Contextual [Unit ] = value.promote(" Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak. " , source)
10981098 }
10991099
11001100 /** Evaluate an expression with the given value for `this` in a given class `klass`
@@ -1223,9 +1223,9 @@ object Semantic {
12231223 lhs match
12241224 case Select (qual, _) =>
12251225 eval(qual, thisV, klass)
1226- eval(rhs, thisV, klass).ensureHot(" May only assign fully initialized value ." , rhs)
1226+ eval(rhs, thisV, klass).ensureHot(" The RHS of an assignment to a field must be fully initialized." , rhs)
12271227 case id : Ident =>
1228- eval(rhs, thisV, klass).ensureHot(" May only assign fully initialized value ." , rhs)
1228+ eval(rhs, thisV, klass).ensureHot(" The RHS of an assignment to a field must be fully initialized." , rhs)
12291229
12301230 case closureDef(ddef) =>
12311231 Fun (ddef.rhs, thisV, klass, env)
@@ -1249,7 +1249,7 @@ object Semantic {
12491249 eval(cases.map(_.body), thisV, klass).join
12501250
12511251 case Return (expr, from) =>
1252- eval(expr, thisV, klass).ensureHot(" return expression may only be initialized value ." , expr)
1252+ eval(expr, thisV, klass).ensureHot(" return expression must be fully initialized ." , expr)
12531253
12541254 case WhileDo (cond, body) =>
12551255 eval(cond :: body :: Nil , thisV, klass)
0 commit comments