Skip to content

Commit 634c858

Browse files
committed
Fix typo
1 parent 4a968c1 commit 634c858

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ object Parsers {
15981598
val inPattern = (staged & StageKind.QuotedPattern) != 0
15991599
val hint =
16001600
if inPattern then "Use lower cased variable name without the `$` instead"
1601-
else "Use a given Type[T] in a quote just write T directly"
1601+
else "To use a given Type[T] in a quote just write T directly"
16021602
syntaxError(s"$msg\n\nHint: $hint", Span(start, in.lastOffset))
16031603
Ident(nme.ERROR.toTypeName)
16041604
else

tests/neg/i15009a.check

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
-- Error: tests/neg/i15009a.scala:3:2 ----------------------------------------------------------------------------------
2-
3 | '[Int] // error
3-
| ^^^^^^
4-
| Quoted types `'[..]` can only be used in patterns.
5-
|
6-
| Hint: To get a scala.quoted.Type[T] use scala.quoted.Type.of[T] instead.
7-
-- Error: tests/neg/i15009a.scala:4:2 ----------------------------------------------------------------------------------
1+
-- Error: tests/neg/i15009a.scala:4:9 ----------------------------------------------------------------------------------
82
4 | '[List[${Type.of[Int]}]] // error
9-
| ^^^^^^^^^^^^^^^^^^^^^^^^
10-
| Quoted types `'[..]` can only be used in patterns.
3+
| ^^^^^^^^^^^^^^^
4+
| Type splicing with `$` in quotes not supported anymore
115
|
12-
| Hint: To get a scala.quoted.Type[T] use scala.quoted.Type.of[T] instead.
6+
| Hint: To use a given Type[T] in a quote just write T directly
137
-- Error: tests/neg/i15009a.scala:7:16 ---------------------------------------------------------------------------------
148
7 | case '[List[$a]] => // error
159
| ^^
@@ -21,13 +15,19 @@
2115
| ^^^^
2216
| Type splicing with `$` in quotes not supported anymore
2317
|
24-
| Hint: Use a given Type[T] in a quote just write T directly
18+
| Hint: To use a given Type[T] in a quote just write T directly
2519
-- Error: tests/neg/i15009a.scala:11:9 ---------------------------------------------------------------------------------
2620
11 | val t: ${int} = ??? // error
2721
| ^^^^^^
2822
| Type splicing with `$` in quotes not supported anymore
2923
|
30-
| Hint: Use a given Type[T] in a quote just write T directly
24+
| Hint: To use a given Type[T] in a quote just write T directly
25+
-- Error: tests/neg/i15009a.scala:3:2 ----------------------------------------------------------------------------------
26+
3 | '[Int] // error
27+
| ^^^^^^
28+
| Quoted types `'[..]` can only be used in patterns.
29+
|
30+
| Hint: To get a scala.quoted.Type[T] use scala.quoted.Type.of[T] instead.
3131
-- [E006] Not Found Error: tests/neg/i15009a.scala:12:2 ----------------------------------------------------------------
3232
12 | $int // error: Not found: $int
3333
| ^^^^

0 commit comments

Comments
 (0)