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 {
293
293
)
294
294
}
295
295
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"
297
302
}
298
303
299
304
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
77
77
-- [E008] Member Not Found Error: <console>:4:59 -------------------------------
78
78
4 |class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
79
79
| ^^^^^^^^
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`?
81
81
scala> val x: List[Int] = "foo" :: List(1)
82
82
-- [E007] Type Mismatch Error: <console>:4:19 ----------------------------------
83
83
4 |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
24
24
-- [E008] Member Not Found Error: <console>:8:12 -------------------------------
25
25
8 |import util.foo.bar
26
26
| ^^^^^^^^
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`?
28
28
scala> :quit
You can’t perform that action at this time.
0 commit comments