aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-04-15 08:51:08 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-05-08 21:47:59 +0200
commit5c11da2148412f36416ad6998909138323ae4894 (patch)
tree4bcc9832255f6c7f16b0e0a4bf08f2c1f4b61ed0 /src/dotty/tools/dotc/core/Types.scala
parent5700ca9d5b4710bcee5aac63c426efd8863e5339 (diff)
downloaddotty-5c11da2148412f36416ad6998909138323ae4894.tar.gz
dotty-5c11da2148412f36416ad6998909138323ae4894.tar.bz2
dotty-5c11da2148412f36416ad6998909138323ae4894.zip
Fix withSymAndName
There was a mismatch between symbol and signature before.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala11
1 files changed, 6 insertions, 5 deletions
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))