diff options
author | Martin Odersky <odersky@gmail.com> | 2004-08-25 15:04:54 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2004-08-25 15:04:54 +0000 |
commit | d93bfce648dc7e23be7e80312988ac0a7109d497 (patch) | |
tree | 78d44c5d0ee7df9646f5e4504f592545ac17850d | |
parent | 8da050118d71c78ef3a4f45daef1edd1b65a5e41 (diff) | |
download | scala-d93bfce648dc7e23be7e80312988ac0a7109d497.tar.gz scala-d93bfce648dc7e23be7e80312988ac0a7109d497.tar.bz2 scala-d93bfce648dc7e23be7e80312988ac0a7109d497.zip |
*** empty log message ***
-rw-r--r-- | sources/scala/tools/scalac/ast/parser/Parser.scala | 10 | ||||
-rw-r--r-- | sources/scalac/symtab/Type.java | 8 |
2 files changed, 3 insertions, 15 deletions
diff --git a/sources/scala/tools/scalac/ast/parser/Parser.scala b/sources/scala/tools/scalac/ast/parser/Parser.scala index 2ce0ec1c3a..b5edbcef5b 100644 --- a/sources/scala/tools/scalac/ast/parser/Parser.scala +++ b/sources/scala/tools/scalac/ast/parser/Parser.scala @@ -183,15 +183,7 @@ class Parser(unit: CompilationUnit) { /////// TREE CONSTRUCTION //////////////////////////////////////////////////// - /** Name supply - */ - var freshCnt = 0; - - def fresh(): Name = { - val n = Name.fromString("x$" + freshCnt); - freshCnt = freshCnt + 1; - n - } + def fresh(): Name = unit.fresh.newName("x"); /** Create a tree representing a packaging */ diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java index 962660b953..5901fc75fa 100644 --- a/sources/scalac/symtab/Type.java +++ b/sources/scalac/symtab/Type.java @@ -1893,6 +1893,8 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags { case ThisType(_): case SingleType(_, _): return this.isSameAs(that); + default: + if (this.isSameAs(that)) return true; } break; @@ -2164,14 +2166,12 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags { return sym1.isModule() && sym == sym1.moduleClass() && sym.owner().thisType().isSameAs(pre1) -/* || this.singleDeref().isSingletonType() && this.singleDeref().isSameAs(that) || that.singleDeref().isSingletonType() && this.isSameAs(that.singleDeref()) -*/ || deAlias(that) != that && this.isSameAs(deAlias(that)); @@ -2185,14 +2185,12 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags { switch (that) { case SingleType(Type pre1, Symbol sym1): return sym == sym1 && pre.isSameAs(pre1) -/* || this.singleDeref().isSingletonType() && this.singleDeref().isSameAs(that) || that.singleDeref().isSingletonType() && this.isSameAs(that.singleDeref()) -*/ || (deAlias(this) != this || deAlias(that) != that) && deAlias(this).isSameAs(deAlias(that)); @@ -2200,14 +2198,12 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags { return sym.isModule() && sym.moduleClass() == sym1 && pre.isSameAs(sym1.owner().thisType()) -/* || this.singleDeref().isSingletonType() && this.singleDeref().isSameAs(that) || that.singleDeref().isSingletonType() && this.isSameAs(that.singleDeref()) -*/ || deAlias(this) != this && deAlias(this).isSameAs(that); |