File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 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 =>
11311131 private def exportForwarders (exp : Export , pathMethod : Symbol )(using Context ): List [tpd.MemberDef ] =
11321132 val buf = new mutable.ListBuffer [tpd.MemberDef ]
11331133 val Export (expr, selectors) = exp
1134- if expr.isEmpty || selectors.exists(_.imported.name == nme. ERROR ) then
1134+ if expr.isEmpty then
11351135 report.error(em " Export selector must have prefix and `.` " , exp.srcPos)
11361136 return Nil
11371137
Original file line number Diff line number Diff line change 668 |val i = 1 // error
77 |^^^
88 |'.' expected, but 'end of statement' found
9- -- Error: tests/neg/i20511.scala:7:21 ------------ ----------------------------------------------------------------------
9+ -- [E083] Type Error: tests/neg/i20511.scala:7:21 ----------------------------------------------------------------------
10107 |export toppingPrice, crustPrice // error // error
1111 | ^^^^^^^^^^
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