Skip to content

Commit 8e3f163

Browse files
committed
Update inline position error message
1 parent 8a2198b commit 8e3f163

12 files changed

+16
-16
lines changed

compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ trait MessageRendering {
3333
*/
3434
def outer(pos: SourcePosition, prefix: String)(implicit ctx: Context): List[String] =
3535
if (pos.outer.exists)
36-
i"$prefix| This location is in code that was inlined at $pos" ::
36+
i"$prefix| This location contains code that was inlined from $pos" ::
3737
outer(pos.outer, prefix)
3838
else Nil
3939

tests/neg-macros/delegate-match-1.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
| ^
55
| AmbiguousImplicits
66
| both value a1 in class Test1 and value a2 in class Test1 match type A
7-
| This location is in code that was inlined at Test_2.scala:6
7+
| This location contains code that was inlined from Test_2.scala:6

tests/neg-macros/delegate-match-2.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
| ^
55
| DivergingImplicit
66
| method a1 in class Test produces a diverging implicit search when trying to match type A
7-
| This location is in code that was inlined at Test_2.scala:5
7+
| This location contains code that was inlined from Test_2.scala:5

tests/neg-macros/delegate-match-3.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
| ^
55
| NoMatchingImplicits
66
| no implicit values were found that match type A
7-
| This location is in code that was inlined at Test_2.scala:3
7+
| This location contains code that was inlined from Test_2.scala:3

tests/neg-macros/i6432.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
44
| ^^^
55
| abc
6-
| This location is in code that was inlined at Test_2.scala:4
6+
| This location contains code that was inlined from Test_2.scala:4
77
-- Error: tests/neg-macros/i6432/Test_2.scala:4:17 ---------------------------------------------------------------------
88
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
99
| ^^^
1010
| xyz
11-
| This location is in code that was inlined at Test_2.scala:4
11+
| This location contains code that was inlined from Test_2.scala:4
1212
-- Error: tests/neg-macros/i6432/Test_2.scala:4:28 ---------------------------------------------------------------------
1313
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
1414
| ^^^
1515
| fgh
16-
| This location is in code that was inlined at Test_2.scala:4
16+
| This location contains code that was inlined from Test_2.scala:4

tests/neg-macros/i6432b.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
44
| ^^^
55
| abc
6-
| This location is in code that was inlined at Test_2.scala:4
6+
| This location contains code that was inlined from Test_2.scala:4
77
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:19 --------------------------------------------------------------------
88
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
99
| ^^^
1010
| xyz
11-
| This location is in code that was inlined at Test_2.scala:4
11+
| This location contains code that was inlined from Test_2.scala:4
1212
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:30 --------------------------------------------------------------------
1313
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
1414
| ^^^
1515
| fgh
16-
| This location is in code that was inlined at Test_2.scala:4
16+
| This location contains code that was inlined from Test_2.scala:4

tests/neg-macros/i6976.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
| scala.MatchError: Inlined(EmptyTree,List(),Literal(Constant(2))) (of class dotty.tools.dotc.ast.Trees$Inlined)
77
| at playground.macros$.mcrImpl(Macro_1.scala:12)
88
|
9-
| This location is in code that was inlined at Test_2.scala:5
9+
| This location contains code that was inlined from Test_2.scala:5

tests/neg-macros/macro-class-not-found-1.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
| java.lang.NoClassDefFoundError
66
| at Foo$.aMacroImplementation(Foo.scala:8)
77
|
8-
| This location is in code that was inlined at Bar.scala:4
8+
| This location contains code that was inlined from Bar.scala:4

tests/neg-macros/macro-class-not-found-2.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
| java.lang.NoClassDefFoundError: this.is.not.a.Class
66
| at Foo$.aMacroImplementation(Foo.scala:8)
77
|
8-
| This location is in code that was inlined at Bar.scala:4
8+
| This location contains code that was inlined from Bar.scala:4

tests/neg-macros/macros-in-same-project-6.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
4 | Foo.myMacro() // error
33
| ^^^^^^^^^^^^^
44
| some error
5-
| This location is in code that was inlined at Bar.scala:4
5+
| This location contains code that was inlined from Bar.scala:4

tests/neg/cannot-reduce-inline-match.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
| "f"
77
| } : String("f")
88
| patterns : case _:Int
9-
| This location is in code that was inlined at cannot-reduce-inline-match.scala:3
9+
| This location contains code that was inlined from cannot-reduce-inline-match.scala:3

tests/neg/inline-error-pos.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
| 2
77
| } : Int(2)
88
| patterns : case 1
9-
| This location is in code that was inlined at inline-error-pos.scala:3
9+
| This location contains code that was inlined from inline-error-pos.scala:3

0 commit comments

Comments
 (0)