File tree 2 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/typer
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1131,7 +1131,7 @@ class Namer { typer: Typer =>
1131
1131
private def exportForwarders (exp : Export , pathMethod : Symbol )(using Context ): List [tpd.MemberDef ] =
1132
1132
val buf = new mutable.ListBuffer [tpd.MemberDef ]
1133
1133
val Export (expr, selectors) = exp
1134
- if expr.isEmpty || selectors.exists(_.imported.name == nme. ERROR ) then
1134
+ if expr.isEmpty then
1135
1135
report.error(em " Export selector must have prefix and `.` " , exp.srcPos)
1136
1136
return Nil
1137
1137
Original file line number Diff line number Diff line change 6
6
8 |val i = 1 // error
7
7
|^^^
8
8
|'.' expected, but 'end of statement' found
9
- -- Error: tests/neg/i20511.scala:7:21 ------------ ----------------------------------------------------------------------
9
+ -- [E083] Type Error: tests/neg/i20511.scala:7:21 ----------------------------------------------------------------------
10
10
7 |export toppingPrice, crustPrice // error // error
11
11
| ^^^^^^^^^^
12
- | Export selector must have prefix and `.`
12
+ | Any is not a valid export prefix, since it is not an immutable path
13
+ |
14
+ | longer explanation available when compiling with `-explain`
You can’t perform that action at this time.
0 commit comments