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 731c5be commit 71d962eCopy full SHA for 71d962e
src/dotty/tools/dotc/core/Types.scala
@@ -413,8 +413,16 @@ object Types {
413
memberExcluding(name, Flags.Private)
414
}
415
416
- final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation =
417
- findMember(name, widenIfUnstable, excluding)
+ final def memberExcluding(name: Name, excluding: FlagSet)(implicit ctx: Context): Denotation = {
+ // We need a valid prefix for `asSeenFrom`
418
+ val pre = this match {
419
+ case tp: ClassInfo =>
420
+ tp.typeRef
421
+ case _ =>
422
+ widenIfUnstable
423
+ }
424
+ findMember(name, pre, excluding)
425
426
427
/** Find member of this type with given name and
428
* produce a denotation that contains the type of the member
0 commit comments