diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-21 22:18:09 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-21 22:24:31 +0100 |
commit | da1032caa4ee4c780b5fff3056dd816623a53737 (patch) | |
tree | bf819b16e339bbcec8ed2d260b86b7abd40efaed /src/reflect | |
parent | 31b52ed651e58a68d478aabe41c62287b6d4d718 (diff) | |
download | scala-da1032caa4ee4c780b5fff3056dd816623a53737.tar.gz scala-da1032caa4ee4c780b5fff3056dd816623a53737.tar.bz2 scala-da1032caa4ee4c780b5fff3056dd816623a53737.zip |
prohibits polymorphic bundles
It's not like they were inducing bugs, but I can't see how polymorphism
can be useful for macro bundles, hence imho it's better to reduce the
number of degrees of freedom of the system.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Definitions.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala index f8f7673530..62e98829b7 100644 --- a/src/reflect/scala/reflect/internal/Definitions.scala +++ b/src/reflect/scala/reflect/internal/Definitions.scala @@ -618,10 +618,11 @@ trait Definitions extends api.StandardDefinitions { macroBundleParamInfo(tp) != NoType def isMacroBundleType(tp: Type) = { + val isMonomorphic = tp.typeSymbol.typeParams.isEmpty val isContextCompatible = macroBundleParamInfo(tp) != NoType val hasSingleConstructor = !tp.declaration(nme.CONSTRUCTOR).isOverloaded val nonAbstract = !tp.erasure.typeSymbol.isAbstractClass - isContextCompatible && hasSingleConstructor && nonAbstract + isMonomorphic && isContextCompatible && hasSingleConstructor && nonAbstract } def isBlackboxMacroBundleType(tp: Type) = { |