Skip to content

Commit dae38d1

Browse files
committed
Move trees to the end of error messages
1 parent fca8d6f commit dae38d1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

frontends/dotty/src/main/scala/stainless/frontends/dotc/CodeExtraction.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class CodeExtraction(inoxCtx: inox.Context, cache: SymbolsContext)(implicit val
279279
outOfSubsetError(t, "Mutable fields in static containers such as objects are not supported")
280280

281281
case other =>
282-
reporter.warning(other.pos, s"Stainless does not support `$other` in static containers")
282+
reporter.warning(other.pos, s"Stainless does not support the following tree in static containers:\n$other")
283283
}
284284

285285
(imports, classes, functions, typeDefs, subs, allClasses, allFunctions, allTypeDefs)
@@ -510,7 +510,7 @@ class CodeExtraction(inoxCtx: inox.Context, cache: SymbolsContext)(implicit val
510510
// ignore
511511

512512
case other =>
513-
reporter.warning(other.pos, s"Stainless does not support `$other` in class $id")
513+
reporter.warning(other.pos, s"In class $id, Stainless does not support:\n$other")
514514
}
515515

516516
val optInv = if (invariants.isEmpty) None else Some {

frontends/scalac/src/main/scala/stainless/frontends/scalac/CodeExtraction.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ trait CodeExtraction extends ASTExtractors {
297297
outOfSubsetError(t, "Mutable fields in static containers such as objects are not supported")
298298

299299
case other =>
300-
reporter.warning(other.pos, s"Stainless does not support `$other` in static containers")
300+
reporter.warning(other.pos, s"Stainless does not support the following tree in static containers:\n$other")
301301
}
302302

303303
(imports, classes, functions, typeDefs, subs, allClasses, allFunctions, allTypeDefs)
@@ -474,7 +474,7 @@ trait CodeExtraction extends ASTExtractors {
474474
// ignore
475475

476476
case other =>
477-
reporter.warning(other.pos, s"Stainless does not support `$other` in class $id")
477+
reporter.warning(other.pos, s"In class $id, Stainless does not support:\n$other")
478478
}
479479

480480
val optInv = if (invariants.isEmpty) None else Some({

0 commit comments

Comments
 (0)