diff options
author | Martin Odersky <odersky@gmail.com> | 2014-04-15 08:51:08 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-05-08 21:47:59 +0200 |
commit | 5c11da2148412f36416ad6998909138323ae4894 (patch) | |
tree | 4bcc9832255f6c7f16b0e0a4bf08f2c1f4b61ed0 | |
parent | 5700ca9d5b4710bcee5aac63c426efd8863e5339 (diff) | |
download | dotty-5c11da2148412f36416ad6998909138323ae4894.tar.gz dotty-5c11da2148412f36416ad6998909138323ae4894.tar.bz2 dotty-5c11da2148412f36416ad6998909138323ae4894.zip |
Fix withSymAndName
There was a mismatch between symbol and signature before.
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index 36af6a438..a4a8fbbc8 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -21,7 +21,6 @@ class Compiler { List( List(new FrontEnd), List(new LazyValsCreateCompanionObjects, - /* new Constructors, */ new TailRec), //force separataion between lazyVals and LVCreateCO List(new PatternMatcher, new LazyValTranformContext().transformer, @@ -30,7 +29,8 @@ class Compiler { new TypeTestsCasts, new InterceptedMethods), List(new Erasure), - List(new UncurryTreeTransform, new CollectEntryPoints) + List(new UncurryTreeTransform + /* , new Constructors */) ) var runId = 1 diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 5ce13ad55..b17c40eb7 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1314,11 +1314,12 @@ object Types { unique(new NonMemberTermRef(prefix, name, sym)) def withSymAndName(prefix: Type, sym: TermSymbol, name: TermName)(implicit ctx: Context): TermRef = - if (prefix eq NoPrefix) withNonMemberSym(prefix, name, sym) - else { - if (sym.defRunId != NoRunId && sym.isCompleted) withSig(prefix, name, sym.signature) - else apply(prefix, name) - } withSym (sym, Signature.NotAMethod) + if (prefix eq NoPrefix) + withNonMemberSym(prefix, name, sym) + else if (sym.defRunId != NoRunId && sym.isCompleted) + withSig(prefix, name, sym.signature) withSym (sym, sym.signature) + else + apply(prefix, name) withSym (sym, Signature.NotAMethod) def withSig(prefix: Type, sym: TermSymbol)(implicit ctx: Context): TermRef = unique(withSig(prefix, sym.name, sym.signature).withSym(sym, sym.signature)) |