diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/scaladoc/run/SI-4676.scala | 3 | ||||
-rw-r--r-- | test/scaladoc/run/t7876b.check | 3 | ||||
-rw-r--r-- | test/scaladoc/run/t7876b.scala | 24 |
3 files changed, 29 insertions, 1 deletions
diff --git a/test/scaladoc/run/SI-4676.scala b/test/scaladoc/run/SI-4676.scala index b83a59a472..99b3c5568a 100644 --- a/test/scaladoc/run/SI-4676.scala +++ b/test/scaladoc/run/SI-4676.scala @@ -21,6 +21,7 @@ object Test extends ScaladocModelTest { // check correct expansion of the use case signature val x = rootPackage._class("SI_4676")._method("x") - assert(x.valueParams(0)(0).resultType.name == "(String, String)", "parameter ss of method x has type (String, String") + val resultType = x.valueParams(0)(0).resultType.name + assert(resultType == "SS", s"parameter ss of method x has type $resultType, expected SS!") } }
\ No newline at end of file diff --git a/test/scaladoc/run/t7876b.check b/test/scaladoc/run/t7876b.check new file mode 100644 index 0000000000..21aaf3b295 --- /dev/null +++ b/test/scaladoc/run/t7876b.check @@ -0,0 +1,3 @@ +foo: FInt +foo: TInt +Done. diff --git a/test/scaladoc/run/t7876b.scala b/test/scaladoc/run/t7876b.scala new file mode 100644 index 0000000000..4d5b8c22cf --- /dev/null +++ b/test/scaladoc/run/t7876b.scala @@ -0,0 +1,24 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +// Don't dealias just to print a Function or Tuple type. +object Test extends ScaladocModelTest { + + override def code = """ + class Test { + type FInt = Function0[Int] + type TInt = Tuple1[Int] + def foo: FInt + def bar: TInt + } + """ + + def scaladocSettings = "" + + def testModel(rootPackage: Package) = { + import access._ + List("foo", "bar").foreach { name => + println("foo: " + rootPackage._class("Test")._method(name).resultType.name) + } + } +} |