File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1- -- [E161] Naming Error: tests/neg/i22721/test2.scala:3:4 ---------------------------------------------------------------
2- 3 |val foobar: Int = 0 // error
3- |^^^^^^^^^^^^^^^^^^^
4- |foobar is already defined as value foobar in tests/neg/i22721/test1.scala
1+ -- [E161] Naming Error: tests/neg/i22721/test2.scala:3:12 --------------------------------------------------------------
2+ 3 |private def foobar: Int = 0 // error
3+ |^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+ |foobar is already defined as method foobar in tests/neg/i22721/test1.scala
5+ |
6+ |Note that overloaded methods must all be defined in the same group of toplevel definitions
Original file line number Diff line number Diff line change 22
33def f (x : B ) = s " B " // error: has already been compiled
44
5- private def g (): Unit = () // OK, since it is private
5+ private def g (): Unit = () // error: has already been compiled (def is visible in package)
You can’t perform that action at this time.
0 commit comments