summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-09-26 11:51:42 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-09-26 11:51:42 +0200
commit001132d842f0d1962a0264307610aa805de4d338 (patch)
tree7ad908d0bb756c1861153fa999a74015d29f6e5f /src/reflect
parentbda48577d022811be58ce2b7f9e46890543ad45b (diff)
downloadscala-001132d842f0d1962a0264307610aa805de4d338.tar.gz
scala-001132d842f0d1962a0264307610aa805de4d338.tar.bz2
scala-001132d842f0d1962a0264307610aa805de4d338.zip
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.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/internal/Definitions.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala
index f8af4f155d..961e8e7264 100644
--- a/src/reflect/scala/reflect/internal/Definitions.scala
+++ b/src/reflect/scala/reflect/internal/Definitions.scala
@@ -658,8 +658,8 @@ trait Definitions extends api.StandardDefinitions {
// These "direct" calls perform no dealiasing. They are most needed when
// printing types when one wants to preserve the true nature of the type.
- def isFunctionTypeDirect(tp: Type) = isFunctionSymbol(tp.typeSymbolDirect)
- def isTupleTypeDirect(tp: Type) = isTupleSymbol(tp.typeSymbolDirect)
+ def isFunctionTypeDirect(tp: Type) = !tp.isHigherKinded && isFunctionSymbol(tp.typeSymbolDirect)
+ def isTupleTypeDirect(tp: Type) = !tp.isHigherKinded && isTupleSymbol(tp.typeSymbolDirect)
// Note that these call .dealiasWiden and not .normalize, the latter of which
// tends to change the course of events by forcing types.