Skip to content

Commit b1ae4bb

Browse files
committed
Fix error message
1 parent 1094b58 commit b1ae4bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,7 @@ object Types {
35093509
def expectValueTypeOrWildcard(tp: Type, where: => String)(using Context): Unit =
35103510
if !tp.isValueTypeOrWildcard then
35113511
assert(!ctx.isAfterTyper, where) // we check correct kinds at PostTyper
3512-
throw TypeError(em"$tp is not a value type, cannot be used in $where")
3512+
throw TypeError(em"$tp is not a value type, cannot be used $where")
35133513

35143514
/** An extractor object to pattern match against a nullable union.
35153515
* e.g.

tests/neg/i16696.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-- Error: tests/neg/i16696.scala:7:29 ----------------------------------------------------------------------------------
22
7 | val boom1 = BoxMaker[Some].make1 // error
33
| ^
4-
| Some is not a value type, cannot be used in in intersection Some & Int
4+
| Some is not a value type, cannot be used in intersection Some & Int
55
-- Error: tests/neg/i16696.scala:8:29 ----------------------------------------------------------------------------------
66
8 | val boom2 = BoxMaker[Some].make2 // error
77
| ^
8-
| Some is not a value type, cannot be used in in union Some | Int
8+
| Some is not a value type, cannot be used in union Some | Int
99
-- Error: tests/neg/i16696.scala:20:27 ---------------------------------------------------------------------------------
1010
20 | val boom = BoxMaker[Foo].make(_.foo) // error
1111
| ^
12-
| test2.Foo is not a value type, cannot be used in in intersection R & test2.Foo
12+
| test2.Foo is not a value type, cannot be used in intersection R & test2.Foo

0 commit comments

Comments
 (0)