summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-11-30 15:59:52 +0000
committerMartin Odersky <odersky@gmail.com>2006-11-30 15:59:52 +0000
commit18a55e81905572065cc441629c7dc07059627fbf (patch)
tree83df977fe938b2e88c46675f7155e49e5537d686 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentcfe4c7ffe65cb8673d08751f8555ad029152811d (diff)
downloadscala-18a55e81905572065cc441629c7dc07059627fbf.tar.gz
scala-18a55e81905572065cc441629c7dc07059627fbf.tar.bz2
scala-18a55e81905572065cc441629c7dc07059627fbf.zip
fixed bugs 835 and 836.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 1ad34fce8b..c9db05b064 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2286,11 +2286,11 @@ trait Typers requires Analyzer {
/** Types a (fully parameterized) type tree */
def typedType(tree: Tree): Tree =
- typed(tree, TYPEmode, WildcardType)
+ withNoGlobalVariance{ typed(tree, TYPEmode, WildcardType) }
/** Types a type constructor tree used in a new or supertype */
def typedTypeConstructor(tree: Tree): Tree = {
- val result = typed(tree, TYPEmode | FUNmode, WildcardType)
+ val result = withNoGlobalVariance{ typed(tree, TYPEmode | FUNmode, WildcardType) }
if (!phase.erasedTypes && result.tpe.isInstanceOf[TypeRef] && !result.tpe.prefix.isStable)
error(tree.pos, ""+result.tpe.prefix+" is not a legal prefix for a constructor")
result