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 @@ -1111,7 +1111,7 @@ class Namer { typer: Typer =>
11111111 private def exportForwarders (exp : Export , pathMethod : Symbol )(using Context ): List [tpd.MemberDef ] =
11121112 val buf = new mutable.ListBuffer [tpd.MemberDef ]
11131113 val Export (expr, selectors) = exp
1114- if expr.isEmpty || selectors.exists(_.imported.name == nme. ERROR ) then
1114+ if expr.isEmpty then
11151115 report.error(em " Export selector must have prefix and `.` " , exp.srcPos)
11161116 return Nil
11171117
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