From 73c4be4fe6e65aabcae07d10ef33e89939185b9f Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Tue, 30 Apr 2024 14:06:28 +0200 Subject: [PATCH] new error message for not hot fields --- .../invalid/Initialization5.dotty.check | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/frontends/benchmarks/extraction/invalid/Initialization5.dotty.check b/frontends/benchmarks/extraction/invalid/Initialization5.dotty.check index 942d670a5..aafcdcf2e 100644 --- a/frontends/benchmarks/extraction/invalid/Initialization5.dotty.check +++ b/frontends/benchmarks/extraction/invalid/Initialization5.dotty.check @@ -1,12 +1,7 @@ -[ Error ] Initialization5.scala:6:17: Cannot prove the method argument is hot. Only hot values are safe to leak. -[ Error ] Found = ThisRef[class NoThis]. -[ Error ] Non initialized field(s): value nothis1, value nothis2. Calling trace: -[ Error ] -> case class NoThis() { [ Initialization5.scala:2 ] -[ Error ] ^ -[ Error ] -> val nothis1 = f() [ Initialization5.scala:3 ] -[ Error ] ^^^ -[ Error ] -> def f() = g(this) [ Initialization5.scala:6 ] -[ Error ] ^^^^ -[ Error ] - def f() = g(this) - ^ \ No newline at end of file +[ Error ] Initialization5.scala:3:9: Not well formed definition @field +[ Error ] @fieldDefPosition(8) +[ Error ] @method(NoThis) +[ Error ] def nothis1: Int = this.f +[ Error ] because field `nothis1` can only refer to previous fields, not to `nothis2` + val nothis1 = f() + ^ \ No newline at end of file