aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-11-15 12:07:31 +0100
committerMartin Odersky <odersky@gmail.com>2014-11-15 12:07:52 +0100
commitc1b0ab6f6ed36fed7cc4bfa710704ff197c12b31 (patch)
tree946fcb12c30b54e6386838e1e38ebdc52c56dcbd /src/dotty/tools/dotc/core/SymDenotations.scala
parent387bdf9fa0bafd76b06d91d5e88f74e29143fc06 (diff)
downloaddotty-c1b0ab6f6ed36fed7cc4bfa710704ff197c12b31.tar.gz
dotty-c1b0ab6f6ed36fed7cc4bfa710704ff197c12b31.tar.bz2
dotty-c1b0ab6f6ed36fed7cc4bfa710704ff197c12b31.zip
Fixes for type argument handling.
(1) Type arguments now get a coordinate. (2) They are labeled Override (2) avoids having to special case TypeArgs in OverridingPairs.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index dfb58f68b..9801cb629 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -805,7 +805,13 @@ object SymDenotations {
* either as overrider or overridee.
*/
final def canMatchInheritedSymbols(implicit ctx: Context): Boolean =
- maybeOwner.isClass && !isConstructor && !is(Private)
+ maybeOwner.isClass && memberCanMatchInheritedSymbols
+
+ /** If false, this class member cannot possibly participate in an override,
+ * either as overrider or overridee.
+ */
+ final def memberCanMatchInheritedSymbols(implicit ctx: Context): Boolean =
+ !isConstructor && !is(Private)
/** The symbol, in class `inClass`, that is overridden by this denotation. */
final def overriddenSymbol(inClass: ClassSymbol)(implicit ctx: Context): Symbol =