summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/Properties.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala2
-rw-r--r--src/compiler/scala/tools/nsc/util/ClassPath.scala2
-rw-r--r--src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala2
-rw-r--r--src/library/rootdoc.txt2
-rw-r--r--src/library/scala/util/Properties.scala6
-rw-r--r--test/files/neg/macro-invalidret.check3
-rw-r--r--test/files/neg/macro-invalidret/Impls_1.scala2
-rw-r--r--test/files/pos/five-dot-f.flags1
-rw-r--r--test/files/run/t5530.flags1
-rw-r--r--test/files/run/t5532.flags1
-rw-r--r--test/files/run/t5614.flags1
-rw-r--r--test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala1
14 files changed, 12 insertions, 18 deletions
diff --git a/src/compiler/scala/tools/nsc/Properties.scala b/src/compiler/scala/tools/nsc/Properties.scala
index 59fefba954..bec686ec05 100644
--- a/src/compiler/scala/tools/nsc/Properties.scala
+++ b/src/compiler/scala/tools/nsc/Properties.scala
@@ -11,7 +11,7 @@ object Properties extends scala.util.PropertiesTrait {
protected def propCategory = "compiler"
protected def pickJarBasedOn = classOf[Global]
- // settings based on jar properties
+ // settings based on jar properties, falling back to System prefixed by "scala."
def residentPromptString = scalaPropOrElse("resident.prompt", "\nnsc> ")
def shellPromptString = scalaPropOrElse("shell.prompt", "\nscala> ")
def shellInterruptedString = scalaPropOrElse("shell.interrupted", ":quit\n")
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index d7cd92adf2..14be8374b9 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -352,7 +352,7 @@ abstract class ClassfileParser {
}
private def loadClassSymbol(name: Name): Symbol = {
- val file = classPath findSourceFile ("" +name) getOrElse {
+ val file = classPath findClassFile ("" +name) getOrElse {
// SI-5593 Scaladoc's current strategy is to visit all packages in search of user code that can be documented
// therefore, it will rummage through the classpath triggering errors whenever it encounters package objects
// that are not in their correct place (see bug for details)
@@ -1047,7 +1047,7 @@ abstract class ClassfileParser {
for (entry <- innerClasses.entries) {
// create a new class member for immediate inner classes
if (entry.outerName == currentClass) {
- val file = classPath.findSourceFile(entry.externalName.toString) getOrElse {
+ val file = classPath.findClassFile(entry.externalName.toString) getOrElse {
throw new AssertionError(entry.externalName)
}
enterClassAndModule(entry, file)
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
index 149b4fe446..cbe427775a 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
@@ -130,7 +130,7 @@ abstract class ICodeReader extends ClassfileParser {
log("ICodeReader reading " + cls)
val name = cls.javaClassName
- classPath.findSourceFile(name) match {
+ classPath.findClassFile(name) match {
case Some(classFile) => parse(classFile, cls)
case _ => MissingRequirementError.notFound("Could not find bytecode for " + cls)
}
diff --git a/src/compiler/scala/tools/nsc/util/ClassPath.scala b/src/compiler/scala/tools/nsc/util/ClassPath.scala
index d2ba61cc0b..e89f08ec6b 100644
--- a/src/compiler/scala/tools/nsc/util/ClassPath.scala
+++ b/src/compiler/scala/tools/nsc/util/ClassPath.scala
@@ -231,7 +231,7 @@ abstract class ClassPath[T] {
classes find (_.name == name)
}
- def findSourceFile(name: String): Option[AbstractFile] =
+ def findClassFile(name: String): Option[AbstractFile] =
findClass(name) match {
case Some(ClassRep(Some(x: AbstractFile), _)) => Some(x)
case _ => None
diff --git a/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala b/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala
index 681204172b..4962d80a8b 100644
--- a/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala
+++ b/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala
@@ -4,7 +4,7 @@ import scala.tools.nsc.io.Path
/** Common settings for the test. */
private[tests] trait TestSettings {
- protected final val TIMEOUT = 10000 // timeout in milliseconds
+ protected final val TIMEOUT = 30000 // timeout in milliseconds
/** The root directory for this test suite, usually the test kind ("test/files/presentation"). */
protected val outDir = Path(Option(System.getProperty("partest.cwd")).getOrElse("."))
diff --git a/src/library/rootdoc.txt b/src/library/rootdoc.txt
index 4795a47efe..e84942b8c4 100644
--- a/src/library/rootdoc.txt
+++ b/src/library/rootdoc.txt
@@ -12,7 +12,7 @@ Notable packages include:
- [[scala.collection.immutable `scala.collection.immutable`]] - Immutable, sequential data-structures such as
[[scala.collection.immutable.Vector `Vector`]], [[scala.collection.immutable.List `List`]],
[[scala.collection.immutable.Range `Range`]], [[scala.collection.immutable.HashMap `HashMap`]] or
- [[scala.collection.immutable.HashSet `HasSet`]]
+ [[scala.collection.immutable.HashSet `HashSet`]]
- [[scala.collection.mutable `scala.collection.mutable`]] - Mutable, sequential data-structures such as
[[scala.collection.mutable.ArrayBuffer `ArrayBuffer`]],
[[scala.collection.mutable.StringBuilder `StringBuilder`]],
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala
index 8835730d95..367488f116 100644
--- a/src/library/scala/util/Properties.scala
+++ b/src/library/scala/util/Properties.scala
@@ -62,10 +62,10 @@ private[scala] trait PropertiesTrait {
def envOrSome(name: String, alt: Option[String]) = envOrNone(name) orElse alt
- // for values based on propFilename
- def scalaPropOrElse(name: String, alt: String): String = scalaProps.getProperty(name, alt)
+ // for values based on propFilename, falling back to System properties
+ def scalaPropOrElse(name: String, alt: String): String = scalaPropOrNone(name).getOrElse(alt)
def scalaPropOrEmpty(name: String): String = scalaPropOrElse(name, "")
- def scalaPropOrNone(name: String): Option[String] = Option(scalaProps.getProperty(name))
+ def scalaPropOrNone(name: String): Option[String] = Option(scalaProps.getProperty(name)).orElse(propOrNone("scala." + name))
/** The numeric portion of the runtime Scala version, if this is a final
* release. If for instance the versionString says "version 2.9.0.final",
diff --git a/test/files/neg/macro-invalidret.check b/test/files/neg/macro-invalidret.check
index 568cc7c570..ebdc8ec7da 100644
--- a/test/files/neg/macro-invalidret.check
+++ b/test/files/neg/macro-invalidret.check
@@ -19,8 +19,7 @@ Macros_Test_2.scala:7: warning: macro defs must have explicitly specified return
def foo6 = macro Impls.foo6
^
Macros_Test_2.scala:14: error: exception during macro expansion:
-scala.NotImplementedError: an implementation is missing
- at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
+java.lang.NullPointerException
at Impls$.foo3(Impls_1.scala:7)
foo3
diff --git a/test/files/neg/macro-invalidret/Impls_1.scala b/test/files/neg/macro-invalidret/Impls_1.scala
index 434aeef10f..a52e8d8f39 100644
--- a/test/files/neg/macro-invalidret/Impls_1.scala
+++ b/test/files/neg/macro-invalidret/Impls_1.scala
@@ -4,7 +4,7 @@ import scala.reflect.runtime.{universe => ru}
object Impls {
def foo1(c: Context) = 2
def foo2(c: Context) = ru.Literal(ru.Constant(42))
- def foo3(c: Context) = ???
+ def foo3(c: Context) = throw null
def foo5(c: Context) = c.universe.Literal(c.universe.Constant(42))
def foo6(c: Context) = c.Expr[Int](c.universe.Literal(c.universe.Constant(42)))
}
diff --git a/test/files/pos/five-dot-f.flags b/test/files/pos/five-dot-f.flags
deleted file mode 100644
index 112fc720a0..0000000000
--- a/test/files/pos/five-dot-f.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfuture \ No newline at end of file
diff --git a/test/files/run/t5530.flags b/test/files/run/t5530.flags
deleted file mode 100644
index e1b37447c9..0000000000
--- a/test/files/run/t5530.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xexperimental \ No newline at end of file
diff --git a/test/files/run/t5532.flags b/test/files/run/t5532.flags
deleted file mode 100644
index e1b37447c9..0000000000
--- a/test/files/run/t5532.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xexperimental \ No newline at end of file
diff --git a/test/files/run/t5614.flags b/test/files/run/t5614.flags
deleted file mode 100644
index 48fd867160..0000000000
--- a/test/files/run/t5614.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xexperimental
diff --git a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
index 91868a5683..e4be42ac96 100644
--- a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
+++ b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
@@ -33,7 +33,6 @@ class SymbolTableForUnitTesting extends SymbolTable {
lazy val loaders: SymbolTableForUnitTesting.this.loaders.type = SymbolTableForUnitTesting.this.loaders
def platformPhases: List[SubComponent] = Nil
val classPath: ClassPath[AbstractFile] = new PathResolver(settings).result
- def doLoad(cls: ClassPath[AbstractFile]#ClassRep): Boolean = true
def isMaybeBoxed(sym: Symbol): Boolean = ???
def needCompile(bin: AbstractFile, src: AbstractFile): Boolean = ???
def externalEquals: Symbol = ???