diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-24 11:55:49 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-24 11:55:49 +0100 |
commit | 336a1fc56074b58c54951a4a351d258f23999281 (patch) | |
tree | 90b1f22b4deafe321cc1e4a52ec28fd35d9185d7 /src/dotty/tools | |
parent | 15bc45cd76445d5d3e8566492fc54b7e4b8f22e3 (diff) | |
download | dotty-336a1fc56074b58c54951a4a351d258f23999281.tar.gz dotty-336a1fc56074b58c54951a4a351d258f23999281.tar.bz2 dotty-336a1fc56074b58c54951a4a351d258f23999281.zip |
Fixed desugaring of Symbol
Need to do Symbol.apply(...) instead of new Symbol(...) because symbols are hash-consed and the constructor is private. This slipped through because of the wholes in accessibility checks which will be fixed in the next commit.
Diffstat (limited to 'src/dotty/tools')
-rw-r--r-- | src/dotty/tools/dotc/ast/Desugar.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala index 3ea3dcbe2..b74b455eb 100644 --- a/src/dotty/tools/dotc/ast/Desugar.scala +++ b/src/dotty/tools/dotc/ast/Desugar.scala @@ -639,7 +639,9 @@ object desugar { // begin desugar tree match { case SymbolLit(str) => - New(ref(defn.SymbolClass.typeRef), (Literal(Constant(str)) :: Nil) :: Nil) + Apply( + Select(ref(defn.SymbolClass.companionModule.termRef), nme.apply), + Literal(Constant(str)) :: Nil) case InterpolatedString(id, strs, elems) => Apply(Select(Apply(Ident(nme.StringContext), strs), id), elems) case InfixOp(l, op, r) => |