From 6a35e3018081a1a8dd90a3e24200223fdbfdce7f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 26 Mar 2014 18:45:03 +0100 Subject: Reworked erasure denotation transformer Now works for all combinations of java/scala sue ErasedValueClass/go directly to underlying type constructors/others wildcards ok/not Signatures had to be refined as well, because the signature depends on whether a type comes form Java or Scala (handling of intersections is different). Also, replaced splitArray method in TypeApplication by extractors for single- and multi-dimensional array types in definitions. --- src/dotty/tools/dotc/core/Symbols.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/dotty/tools/dotc/core/Symbols.scala') diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index ff70679b8..b4db26ae6 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -379,6 +379,11 @@ object Symbols { /** If this symbol satisfies predicate `p` this symbol, otherwise `NoSymbol` */ def filter(p: Symbol => Boolean): Symbol = if (p(this)) this else NoSymbol + /** Is this symbol a user-defined value class? */ + final def isDerivedValueClass(implicit ctx: Context): Boolean = + false && // value classes are not supported yet + isClass && denot.derivesFrom(defn.AnyValClass) && !isPrimitiveValueClass + /** Is symbol a primitive value class? */ def isPrimitiveValueClass(implicit ctx: Context) = defn.ScalaValueClasses contains this -- cgit v1.2.3