summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/resources/SI_4287.scala6
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala11
2 files changed, 17 insertions, 0 deletions
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
+ }
+ }
}