From 001132d842f0d1962a0264307610aa805de4d338 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 26 Sep 2013 11:51:42 +0200 Subject: SI-7876 Scaladoc crasher due to regression in isFunctionType. `isFunctionType` and `isTupleType` started returing true for type constructors as of aeb73314. This led to a crash in type printing in ScalaDoc (specfically, in ModelFactoryTypeSupport.scala) This commit: - fixes those methods by guarding with !isHigherKinded - unit tests said methods - tests the reported crasher with a ScalaDoc test. --- test/scaladoc/run/t7876.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/scaladoc/run/t7876.scala (limited to 'test/scaladoc/run/t7876.scala') diff --git a/test/scaladoc/run/t7876.scala b/test/scaladoc/run/t7876.scala new file mode 100644 index 0000000000..63c63f8a0c --- /dev/null +++ b/test/scaladoc/run/t7876.scala @@ -0,0 +1,19 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + + override def code = """ + import language.higherKinds + trait T[M[_]] + class C extends T[Function0] + class D extends T[Tuple1] + """ + + def scaladocSettings = "" + + def testModel(rootPackage: Package) = { + import access._ + // did not crash + } +} -- cgit v1.2.3