diff options
author | Martin Odersky <odersky@gmail.com> | 2013-11-07 21:38:30 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-11-07 21:38:30 +0100 |
commit | 514801453e240610a0ba68fff7305355a7d204e1 (patch) | |
tree | 98b840cef13449dd8f280c576f5620ecec557061 /src/dotty/tools/dotc/printing | |
parent | 44267a9abc74de11e76ecd2ae7bf1cb0d0152043 (diff) | |
download | dotty-514801453e240610a0ba68fff7305355a7d204e1.tar.gz dotty-514801453e240610a0ba68fff7305355a7d204e1.tar.bz2 dotty-514801453e240610a0ba68fff7305355a7d204e1.zip |
Fixing NoPosition leaks
Previously, some trees could contain subtrees with NoPosition. This happended when a tree had both positioned children and other children with NoPosition. When setting the synthetic position of a tree, the NoPosition children were not visited.
Diffstat (limited to 'src/dotty/tools/dotc/printing')
-rw-r--r-- | src/dotty/tools/dotc/printing/RefinedPrinter.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala index ee0ba93a3..546a3e027 100644 --- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -80,7 +80,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { def toTextFunction(args: List[Type]): Text = changePrec(GlobalPrec) { val argStr: Text = - if (args.length == 2 && !(defn.TupleClasses contains args.head.typeSymbol)) + if (args.length == 2 && !defn.isTupleType(args.head)) atPrec(InfixPrec) { toText(args.head) } else toTextTuple(args.init) |