diff options
author | Martin Odersky <odersky@gmail.com> | 2012-02-22 19:01:49 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2012-02-22 19:01:49 +0100 |
commit | 3f168cabab3aa0e7ceb54d9b9afffef39ac33348 (patch) | |
tree | ee827c57f038f3fc52868b703312d95e1e67d876 | |
parent | 4c151ccd186779feb4499e0b9aec1c52d4681fbf (diff) | |
download | scala-3f168cabab3aa0e7ceb54d9b9afffef39ac33348.tar.gz scala-3f168cabab3aa0e7ceb54d9b9afffef39ac33348.tar.bz2 scala-3f168cabab3aa0e7ceb54d9b9afffef39ac33348.zip |
Enable derived value classes with an underlying field of a type parameter. They are too useful to ban.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 2b9880ff65..7f6e253045 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1205,8 +1205,6 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { sym == acc || acc.hasAccessorFlag && sym == acc.accessed if (acc.accessBoundary(clazz) != RootClass) unit.error(acc.pos, "Value class needs to have a publicly accessible val parameter") - if (acc.tpe.resultType.typeSymbol.isTypeParameter) - unit.error(acc.pos, "Type of parameter of value class may not be a type variable") for (stat <- body) if (!treeInfo.isAllowedInUniversalTrait(stat) && !isUnderlyingAcc(stat.symbol)) unit.error(stat.pos, |