summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-02-22 19:01:49 +0100
committerMartin Odersky <odersky@gmail.com>2012-02-22 19:01:49 +0100
commit3f168cabab3aa0e7ceb54d9b9afffef39ac33348 (patch)
treeee827c57f038f3fc52868b703312d95e1e67d876 /src
parent4c151ccd186779feb4499e0b9aec1c52d4681fbf (diff)
downloadscala-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.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
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,