File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
compiler/src/dotty/tools/dotc/reporting/diagnostic Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,12 @@ object messages {
293293 )
294294 }
295295
296- ex " $selected ` $name` is not a member of $site$closeMember"
296+ val siteType = site match {
297+ case tp : NamedType => tp.info
298+ case tp => tp
299+ }
300+
301+ ex " $selected ` $name` is not a member of $siteType$closeMember"
297302 }
298303
299304 val explanation = " "
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ scala> class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
7777-- [E008] Member Not Found Error: <console>:4:59 -------------------------------
78784 |class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
7979 | ^^^^^^^^
80- | value `barr` is not a member of Foo(foo) - did you mean `foo.bar`?
80+ | value `barr` is not a member of Foo - did you mean `foo.bar`?
8181scala> val x: List[Int] = "foo" :: List(1)
8282-- [E007] Type Mismatch Error: <console>:4:19 ----------------------------------
83834 |val x: List[Int] = "foo" :: List(1)
Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ scala> import util.foo.bar
2424-- [E008] Member Not Found Error: <console>:8:12 -------------------------------
25258 |import util.foo.bar
2626 | ^^^^^^^^
27- | value `foo` is not a member of util.type - did you mean `util.Left`?
27+ | value `foo` is not a member of util - did you mean `util.Left`?
2828scala> :quit
You can’t perform that action at this time.
0 commit comments