diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-31 15:42:52 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-04-08 16:55:49 +0200 |
commit | eb3df0db4a57d89c0d7370a9180742273db166b2 (patch) | |
tree | 6fc1d5db88e416b1df0bfa4a1deefab98550aa1e /src/dotty/tools/dotc/typer/Applications.scala | |
parent | 26185f6b17429d2af7686139dbb4d13ede4c9e99 (diff) | |
download | dotty-eb3df0db4a57d89c0d7370a9180742273db166b2.tar.gz dotty-eb3df0db4a57d89c0d7370a9180742273db166b2.tar.bz2 dotty-eb3df0db4a57d89c0d7370a9180742273db166b2.zip |
Corrected computations of union denotations.
Cannot discard a symbol simply because the other side's type is weaker.
If in (A | B)#m A and B resolve to different symbols `m`, the resulting denotation
cannot have either `m` as symbol; it must be NoSymbol instead.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 57f11480c..0f47336fc 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -794,8 +794,8 @@ trait Applications extends Compatibility { self: Typer => tp } - val owner1 = alt1.symbol.owner - val owner2 = alt2.symbol.owner + val owner1 = if (alt1.symbol.exists) alt1.symbol.owner else NoSymbol + val owner2 = if (alt2.symbol.exists) alt2.symbol.owner else NoSymbol val tp1 = stripImplicit(alt1.widen) val tp2 = stripImplicit(alt2.widen) |