Skip to content

Commit

Permalink
Add missing suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Mar 11, 2021
1 parent 45d0678 commit 0565622
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
case ClazzTag => "classOf[" ~ toText(const.typeValue) ~ "]"
case CharTag => literalText(s"'${escapedChar(const.charValue)}'")
case LongTag => literalText(const.longValue.toString + "L")
case DoubleTag => literalText(const.doubleValue.toString + "d")
case FloatTag => literalText(const.floatValue.toString + "f")
case _ => literalText(String.valueOf(const.value))
}

Expand Down
2 changes: 1 addition & 1 deletion scaladoc-testcases/src/tests/genericMethods.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Types:
def mixedAndAndOr(base: Int & String, nested: List[Int | Double] & Seq[String]): Unit
= ???

def literal(i: 1, d: 3.3, c: 'c'): 34
def literal(i: 1, d: 3.3d, c: 'c'): 34
= 34

def byName(a: => Int, b: => String | Int): Unit
Expand Down

0 comments on commit 0565622

Please sign in to comment.