diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-03-23 08:59:51 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-03-23 12:52:40 +0100 |
commit | dd89b006218d76a74d0185392d5e427c0867a33c (patch) | |
tree | 5d6202ccf02733a0c938fd2ccf008bff5ae84be6 /test/support | |
parent | 499962d34e83134d622fa319b84664ee2747dd72 (diff) | |
download | scala-dd89b006218d76a74d0185392d5e427c0867a33c.tar.gz scala-dd89b006218d76a74d0185392d5e427c0867a33c.tar.bz2 scala-dd89b006218d76a74d0185392d5e427c0867a33c.zip |
SI-7285 Fix match analysis with nested objects.
The fix for SI-6146 introduced `nestedMemberType` to
enumerate sealed subtypes based on the (prefixed) type
of the scrutinee and the symbols of its sealed subclasses.
That method needed to widen `ThisType(modSym)`s to
`ModuleTypeRef(modSym)` before calling `asSeenFrom`.
However, this could lead to confused in the match analysis,
which sees `ModuleTypeRef` as distinct from singleton types
on the same modules (after all, they aren't =:=). Spurious
warnings ensued.
This commit makes two changes:
- conditionally re-narrow the result of `asSeenFrom` in `nestedMemberType`.
- present `a.b.SomeModule.type` as `SomeModule` in warnings emitted
by the pattern matcher.
Diffstat (limited to 'test/support')
0 files changed, 0 insertions, 0 deletions