diff options
author | Martin Odersky <odersky@gmail.com> | 2014-07-15 15:47:56 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-03 17:07:10 +0200 |
commit | ef4d3f5c214c1f3a5330f4583bca2773bc2f465f (patch) | |
tree | 0d3a2572164d359d2df317a02add012ea74e5a7f | |
parent | b88b958bb7f25ba45a6c15c9f554df2d4c6746ed (diff) | |
download | dotty-ef4d3f5c214c1f3a5330f4583bca2773bc2f465f.tar.gz dotty-ef4d3f5c214c1f3a5330f4583bca2773bc2f465f.tar.bz2 dotty-ef4d3f5c214c1f3a5330f4583bca2773bc2f465f.zip |
Fixed tpd.ref
Did not work for this prefixes and other singleon types before.
I.d. was generating a SelectFromType tree, which is wrong.
-rw-r--r-- | src/dotty/tools/dotc/ast/tpd.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala index 0ef855de2..fa836f053 100644 --- a/src/dotty/tools/dotc/ast/tpd.scala +++ b/src/dotty/tools/dotc/ast/tpd.scala @@ -256,7 +256,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { def ref(tp: NamedType)(implicit ctx: Context): NameTree = if (tp.symbol.isStatic || tp.prefix == NoPrefix) Ident(tp) else tp.prefix match { - case pre: TermRef => ref(pre).select(tp) + case pre: SingletonType => singleton(pre).select(tp) case pre => SelectFromTypeTree(TypeTree(pre), tp) } // no checks necessary |