diff options
author | Martin Odersky <odersky@gmail.com> | 2007-01-25 15:50:26 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-01-25 15:50:26 +0000 |
commit | 803488f3e2e1074c373cac55d8d4c08ac4a07eb9 (patch) | |
tree | 568687a91e8cf3c65c917cebc1b14a5573fb1570 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala | |
parent | 44d630b0ced6d101a43955bd0755d098d6e613b2 (diff) | |
download | scala-803488f3e2e1074c373cac55d8d4c08ac4a07eb9.tar.gz scala-803488f3e2e1074c373cac55d8d4c08ac4a07eb9.tar.bz2 scala-803488f3e2e1074c373cac55d8d4c08ac4a07eb9.zip |
1.
2. More detailed error messages for ambiguous implicits. 3. Relaxed
rules for necessary overlap in pattern matching
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 2e4742e94c..a77098a50f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -51,7 +51,7 @@ trait Contexts requires Analyzer { addImport(JavaLangPackage) assert(ScalaPackage ne null, "Scala package is null") addImport(ScalaPackage) - if (!settings.nopredefs.value/* || unit.source.file.name != "Predef.scala"*/) + if (!(settings.nopredefs.value || treeInfo.containsLeadingPredefImport(List(unit.body)))) addImport(PredefModule) } val c = sc.make(unit, tree, sc.owner, sc.scope, sc.imports) |