aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-07-11 10:08:05 +0200
committerMartin Odersky <odersky@gmail.com>2013-07-11 10:08:05 +0200
commit62ac6eb04b32ad9795754143d8934343ed3d9a8f (patch)
tree49610f5d49bf00be0194ac9e5e1629b9a5f8df78 /src/dotty/tools/dotc/core/Types.scala
parentc9679f6c0f3c8200e1b1f537e89488094cfc2576 (diff)
downloaddotty-62ac6eb04b32ad9795754143d8934343ed3d9a8f.tar.gz
dotty-62ac6eb04b32ad9795754143d8934343ed3d9a8f.tar.bz2
dotty-62ac6eb04b32ad9795754143d8934343ed3d9a8f.zip
Avoided cycle in newCompletePackageSymbol by passing name explicity.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 924517e09..71b15f98a 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1167,8 +1167,10 @@ object Types {
object TermRef {
def apply(prefix: Type, name: TermName)(implicit ctx: Context): TermRef =
unique(new CachedTermRef(prefix, name))
+ def withSym(prefix: Type, name: TermName, sym: TermSymbol)(implicit ctx: Context): TermRefBySym =
+ unique(new TermRefBySym(prefix, name, sym))
def withSym(prefix: Type, sym: TermSymbol)(implicit ctx: Context): TermRefBySym =
- unique(new TermRefBySym(prefix, sym.name, sym))
+ withSym(prefix, sym.name, sym)
def withSig(prefix: Type, name: TermName, sig: Signature)(implicit ctx: Context): TermRefWithSignature =
unique(new TermRefWithSignature(prefix, name, sig))
}
@@ -1176,8 +1178,10 @@ object Types {
object TypeRef {
def apply(prefix: Type, name: TypeName)(implicit ctx: Context): TypeRef =
unique(new CachedTypeRef(prefix, name))
+ def withSym(prefix: Type, name: TypeName, sym: TypeSymbol)(implicit ctx: Context): TypeRefBySym =
+ unique(new TypeRefBySym(prefix, name, sym))
def withSym(prefix: Type, sym: TypeSymbol)(implicit ctx: Context): TypeRefBySym =
- unique(new TypeRefBySym(prefix, sym.name, sym))
+ withSym(prefix, sym.name, sym)
}
// --- Other SingletonTypes: ThisType/SuperType/ConstantType ---------------------------