aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-01-14 19:04:47 +0100
committerMartin Odersky <odersky@gmail.com>2015-01-14 19:09:34 +0100
commit19234838329aabfe202a2fbf46470528baebd83c (patch)
treea7b0193e7a20fb2a480d1c2b5839ad76979f05ca /src/dotty/tools/dotc/core/Symbols.scala
parentc0b75098f66d4611683bc308d7f6127e6c6e433b (diff)
downloaddotty-19234838329aabfe202a2fbf46470528baebd83c.tar.gz
dotty-19234838329aabfe202a2fbf46470528baebd83c.tar.bz2
dotty-19234838329aabfe202a2fbf46470528baebd83c.zip
Allow to merge TypeBounds and ClassInfos in |, &
There seems to be no reason why we should not merge a class and an abstract type that has the class within its bounds. I.e. Assume class A { type T } class B { class T } Then (A | B) # T should be legal and refer to type T, and (A & B) # T should be legal and refer to class T.
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 2be97691f..2854d7d2f 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -256,6 +256,9 @@ trait Symbols { this: Context =>
tparams
}
+ /** Create a new skolem symbol. This is not the same as SkolemType, even thouggh the
+ * motivation (create a singleton referencing to a type)= is similar.
+ */
def newSkolem(tp: Type) = newSymbol(defn.RootClass, nme.SKOLEM, SyntheticArtifact | Permanent, tp)
def newErrorSymbol(owner: Symbol, name: Name) =