From 8709b52eef9a0c0b2600664e38e01af3423e93f6 Mon Sep 17 00:00:00 2001 From: Kato Kazuyoshi Date: Sat, 6 Aug 2011 12:48:48 +0000 Subject: Some "synthetic" code don't have RangePosition. --- test/scaladoc/resources/SI_4287.scala | 6 ++++++ test/scaladoc/scala/html/HtmlFactoryTest.scala | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 test/scaladoc/resources/SI_4287.scala (limited to 'test/scaladoc') diff --git a/test/scaladoc/resources/SI_4287.scala b/test/scaladoc/resources/SI_4287.scala new file mode 100644 index 0000000000..9846db466d --- /dev/null +++ b/test/scaladoc/resources/SI_4287.scala @@ -0,0 +1,6 @@ +class ClassWithSugar(val x: Int = 123) { +} + +class ClassWithoutSugar { + def this(x: Int = 456) = this() +} diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala index f3973fa7c9..45792056fc 100644 --- a/test/scaladoc/scala/html/HtmlFactoryTest.scala +++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala @@ -353,4 +353,15 @@ object Test extends Properties("HtmlFactory") { case _ => false } } + + property("Default arguments of synthesized constructor") = { + val files = createTemplates("SI_4287.scala") + + files("ClassWithSugar.html") match { + case node: scala.xml.Node => { + node.toString.contains(">123<") + } + case _ => false + } + } } -- cgit v1.2.3