We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca2fb9d commit e9adc8aCopy full SHA for e9adc8a
src/dotty/tools/dotc/core/Types.scala
@@ -415,8 +415,16 @@ object Types {
415
memberExcluding(name, Flags.Private)
416
}
417
418
- final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation =
419
- findMember(name, widenIfUnstable, excluding)
+ final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation = {
+ // We need a valid prefix for `asSeenFrom`
420
+ val pre = this match {
421
+ case tp: ClassInfo =>
422
+ tp.typeRef
423
+ case _ =>
424
+ widenIfUnstable
425
+ }
426
+ findMember(name, pre, excluding)
427
428
429
/** Find member of this type with given name and
430
* produce a denotation that contains the type of the member
0 commit comments