From 5aac086d63807331e380bb2d861e4e07800b1f63 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 16 Feb 2017 23:35:18 +0100 Subject: Disable tests that require scala-compiler This is necessary if we ever want to get rid of our dependency on scala-compiler --- tests/disabled/scalac-dependent/neg/selfreq.scala | 37 ++++++++++ .../scalac-dependent/pos-special/i859.scala | 3 + .../scalac-dependent/pos/t5604/ReplConfig.scala | 53 +++++++++++++ .../scalac-dependent/pos/t5604/ReplReporter.scala | 30 ++++++++ tests/disabled/scalac-dependent/pos/t5899.scala | 19 +++++ tests/disabled/scalac-dependent/pos/t7591.scala | 86 ++++++++++++++++++++++ .../scalac-dependent/pos/trait-force-info.scala | 18 +++++ tests/disabled/scalac-dependent/run/t1618.scala | 11 +++ tests/disabled/scalac-dependent/run/t7775.scala | 17 +++++ tests/neg/selfreq.scala | 37 ---------- tests/pos-special/i859.scala | 3 - tests/pos/t5604/ReplConfig.scala | 53 ------------- tests/pos/t5604/ReplReporter.scala | 30 -------- tests/pos/t5899.scala | 19 ----- tests/pos/t7591.scala | 86 ---------------------- tests/pos/trait-force-info.scala | 18 ----- tests/run/t1618.scala | 11 --- tests/run/t7775.scala | 17 ----- 18 files changed, 274 insertions(+), 274 deletions(-) create mode 100644 tests/disabled/scalac-dependent/neg/selfreq.scala create mode 100644 tests/disabled/scalac-dependent/pos-special/i859.scala create mode 100644 tests/disabled/scalac-dependent/pos/t5604/ReplConfig.scala create mode 100644 tests/disabled/scalac-dependent/pos/t5604/ReplReporter.scala create mode 100644 tests/disabled/scalac-dependent/pos/t5899.scala create mode 100644 tests/disabled/scalac-dependent/pos/t7591.scala create mode 100644 tests/disabled/scalac-dependent/pos/trait-force-info.scala create mode 100644 tests/disabled/scalac-dependent/run/t1618.scala create mode 100644 tests/disabled/scalac-dependent/run/t7775.scala delete mode 100644 tests/neg/selfreq.scala delete mode 100644 tests/pos-special/i859.scala delete mode 100644 tests/pos/t5604/ReplConfig.scala delete mode 100644 tests/pos/t5604/ReplReporter.scala delete mode 100644 tests/pos/t5899.scala delete mode 100644 tests/pos/t7591.scala delete mode 100644 tests/pos/trait-force-info.scala delete mode 100644 tests/run/t1618.scala delete mode 100644 tests/run/t7775.scala (limited to 'tests') diff --git a/tests/disabled/scalac-dependent/neg/selfreq.scala b/tests/disabled/scalac-dependent/neg/selfreq.scala new file mode 100644 index 000000000..1ca373b4b --- /dev/null +++ b/tests/disabled/scalac-dependent/neg/selfreq.scala @@ -0,0 +1,37 @@ +trait X { self: Y => // error: cannot resolve reference to type (Y & X)(X.this).V + + type T <: self.U + + def foo(x: T): T // old-error: cannot resolve reference to type (Y & X)(X.this).V + def foo(x: String): String + +} + +trait Y { self: Z => + + type U <: self.V + +} + +trait Z { + + class V + +} + +object O { + val x: X = ??? + x.foo("a") // error: cannot resolve reference to type (Y & X)(X.this).V +} + +import scala.tools.nsc.interpreter.IMain + +object Test extends dotty.runtime.LegacyApp { + val engine = new IMain.Factory getScriptEngine() + engine.asInstanceOf[IMain].settings.usejavacp.value = true // no longer an error since we unpickle Scala2 inner classes with fixed syms + val res2 = engine.asInstanceOf[javax.script.Compilable] + res2 compile "8" eval() + val res5 = res2 compile """println("hello") ; 8""" + res5 eval() + res5 eval() +} diff --git a/tests/disabled/scalac-dependent/pos-special/i859.scala b/tests/disabled/scalac-dependent/pos-special/i859.scala new file mode 100644 index 000000000..a9f6b51c9 --- /dev/null +++ b/tests/disabled/scalac-dependent/pos-special/i859.scala @@ -0,0 +1,3 @@ +class Analyzer { + def foo: scala.tools.nsc.Global = ??? +} diff --git a/tests/disabled/scalac-dependent/pos/t5604/ReplConfig.scala b/tests/disabled/scalac-dependent/pos/t5604/ReplConfig.scala new file mode 100644 index 000000000..8c589eba6 --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/t5604/ReplConfig.scala @@ -0,0 +1,53 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2011 LAMP/EPFL + * @author Paul Phillips + */ + +package scala.tools.nsc +package interpreter + +import util.Exceptional.unwrap +import util.stackTraceString + +trait ReplConfig { + lazy val replProps = new ReplProps + + class TapMaker[T](x: T) { + def tapInfo(msg: => String): T = tap(x => replinfo(parens(x))) + def tapDebug(msg: => String): T = tap(x => repldbg(parens(x))) + def tapTrace(msg: => String): T = tap(x => repltrace(parens(x))) + def tap[U](f: T => U): T = { + f(x) + x + } + } + + private def parens(x: Any) = "(" + x + ")" + private def echo(msg: => String) = + try Console println msg + catch { case x: AssertionError => Console.println("Assertion error printing debugging output: " + x) } + + private[nsc] def repldbg(msg: => String) = if (isReplDebug) echo(msg) + private[nsc] def repltrace(msg: => String) = if (isReplTrace) echo(msg) + private[nsc] def replinfo(msg: => String) = if (isReplInfo) echo(msg) + + private[nsc] def logAndDiscard[T](label: String, alt: => T): PartialFunction[Throwable, T] = { + case t => + repldbg(label + ": " + unwrap(t)) + repltrace(stackTraceString(unwrap(t))) + alt + } + private[nsc] def substituteAndLog[T](alt: => T)(body: => T): T = + substituteAndLog("" + alt, alt)(body) + private[nsc] def substituteAndLog[T](label: String, alt: => T)(body: => T): T = { + try body + catch logAndDiscard(label, alt) + } + private[nsc] def squashAndLog(label: String)(body: => Unit): Unit = + substituteAndLog(label, ())(body) + + def isReplTrace: Boolean = replProps.trace + def isReplDebug: Boolean = replProps.debug || isReplTrace + def isReplInfo: Boolean = replProps.info || isReplDebug + def isReplPower: Boolean = replProps.power +} diff --git a/tests/disabled/scalac-dependent/pos/t5604/ReplReporter.scala b/tests/disabled/scalac-dependent/pos/t5604/ReplReporter.scala new file mode 100644 index 000000000..9423efd8a --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/t5604/ReplReporter.scala @@ -0,0 +1,30 @@ +/* NSC -- new Scala compiler + * Copyright 2002-2011 LAMP/EPFL + * @author Paul Phillips + */ + +package scala.tools.nsc +package interpreter + +import reporters._ +import IMain._ + +class ReplReporter(intp: IMain) extends ConsoleReporter(intp.settings, Console.in, new ReplStrippingWriter(intp)) { + override def printMessage(msg: String): Unit = { + // Avoiding deadlock if the compiler starts logging before + // the lazy val is complete. + if (intp.isInitializeComplete) { + if (intp.totalSilence) { + if (isReplTrace) + super.printMessage("[silent] " + msg) + } + else super.printMessage(msg) + } + else Console.println("[init] " + msg) + } + + override def displayPrompt(): Unit = { + if (intp.totalSilence) () + else super.displayPrompt() + } +} diff --git a/tests/disabled/scalac-dependent/pos/t5899.scala b/tests/disabled/scalac-dependent/pos/t5899.scala new file mode 100644 index 000000000..852b4e3e7 --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/t5899.scala @@ -0,0 +1,19 @@ +import scala.tools.nsc._ + +trait Foo { + val global: Global + import global.{Name, Symbol, nme} + + case class Bippy(name: Name) + + def f(x: Bippy, sym: Symbol): Int = { + // no warning (!) for + // val Stable = sym.name.toTermName + + val Stable = sym.name + Bippy(Stable) match { + case Bippy(nme.WILDCARD) => 1 + case Bippy(Stable) => 2 // should not be considered unreachable + } + } +} diff --git a/tests/disabled/scalac-dependent/pos/t7591.scala b/tests/disabled/scalac-dependent/pos/t7591.scala new file mode 100644 index 000000000..dd127b881 --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/t7591.scala @@ -0,0 +1,86 @@ +/* NEST (New Scala Test) + * Copyright 2007-2013 LAMP/EPFL + * @author Paul Phillips + */ + +import scala.tools.cmd._ + +/** A sample command specification for illustrative purposes. + * First take advantage of the meta-options: + * + * // this command creates an executable runner script "demo" + * % scala scala.tools.cmd.Demo --self-update demo + * + * // this one creates and sources a completion file - note backticks + * % `./demo --bash` + * + * // and now you have a runner with working completion + * % ./demo -- + * --action --defint --int + * --bash --defstr --str + * --defenv --self-update --unary + * + * The normal option configuration is plausibly self-explanatory. + */ +trait DemoSpec extends Spec with Meta.StdOpts with Interpolation { + lazy val referenceSpec = DemoSpec + lazy val programInfo = Spec.Info("demo", "Usage: demo []", "scala.tools.cmd.Demo") + + help("""Usage: demo []""") + heading("Unary options:") + + val optIsUnary = "unary" / "a unary option" --? ; + ("action" / "a body which may be run") --> println("Hello, I am the --action body.") + + heading("Binary options:") + val optopt = "str" / "an optional String" --| + val optoptInt = ("int" / "an optional Int") . --^[Int] + val optEnv = "defenv" / "an optional String" defaultToEnv "PATH" + val optDefault = "defstr" / "an optional String" defaultTo "default" + val optDefaultInt = "defint" / "an optional Int" defaultTo -1 + val optExpand = "alias" / "an option which expands" expandTo ("--int", "15") +} + +object DemoSpec extends DemoSpec with Property { + lazy val propMapper = new PropertyMapper(DemoSpec) + + type ThisCommandLine = SpecCommandLine + def creator(args: List[String]) = + new SpecCommandLine(args) { + override def errorFn(msg: String) = { println("Error: " + msg) ; sys.exit(0) } + } +} + +class Demo(args: List[String]) extends DemoSpec with Instance { +// TODO NEEDS MANUAL CHANGE (early initializers) +// BEGIN copied early initializers +val parsed = DemoSpec(args: _*) +// END copied early initializers + + import java.lang.reflect._ + + def helpMsg = DemoSpec.helpMsg + def demoSpecMethods = this.getClass.getMethods.toList + private def isDemo(m: Method) = (m.getName startsWith "opt") && !(m.getName contains "$") && (m.getParameterTypes.isEmpty) + + def demoString(ms: List[Method]) = { + val longest = ms map (_.getName.length) max + val formatStr = " %-" + longest + "s: %s" + val xs = ms map (m => formatStr.format(m.getName, m.invoke(this))) + + xs mkString ("Demo(\n ", "\n ", "\n)\n") + } + + override def toString = demoString(demoSpecMethods filter isDemo) +} + +object Demo { + def main(args: Array[String]): Unit = { + val runner = new Demo(args.toList) + + if (args.isEmpty) + println(runner.helpMsg) + + println(runner) + } +} diff --git a/tests/disabled/scalac-dependent/pos/trait-force-info.scala b/tests/disabled/scalac-dependent/pos/trait-force-info.scala new file mode 100644 index 000000000..c2b33869c --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/trait-force-info.scala @@ -0,0 +1,18 @@ +/** This does NOT crash unless it's in the interactive package. + */ + +package scala.tools.nsc +package interactive + +trait MyContextTrees { + val self: Global + val NoContext = self.analyzer.NoContext +} +// +// error: java.lang.AssertionError: assertion failed: trait Contexts.NoContext$ linkedModule: List() +// at scala.Predef$.assert(Predef.scala:160) +// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol$1(ClassfileParser.scala:1211) +// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1223) +// at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:489) +// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:757) +// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:789) diff --git a/tests/disabled/scalac-dependent/run/t1618.scala b/tests/disabled/scalac-dependent/run/t1618.scala new file mode 100644 index 000000000..248af9b4f --- /dev/null +++ b/tests/disabled/scalac-dependent/run/t1618.scala @@ -0,0 +1,11 @@ + +object Test extends dotty.runtime.LegacyApp { + import scala.tools.nsc.io._ + + val dir: VirtualDirectory = new VirtualDirectory("foo", None) + dir.subdirectoryNamed("foo") + assert(dir.lookupName("foo", true) != null) + +} + + diff --git a/tests/disabled/scalac-dependent/run/t7775.scala b/tests/disabled/scalac-dependent/run/t7775.scala new file mode 100644 index 000000000..bc6a67d0e --- /dev/null +++ b/tests/disabled/scalac-dependent/run/t7775.scala @@ -0,0 +1,17 @@ +import scala.concurrent.{duration, Future, Await, ExecutionContext} +import scala.tools.nsc.Settings +import ExecutionContext.Implicits.global + +// Was failing pretty regularly with a ConcurrentModificationException as +// WrappedProperties#systemProperties iterated directly over the mutable +// global system properties map. +object Test { + def main(args: Array[String]): Unit = { + val tries = 1000 // YMMV + val compiler = Future { + for(_ <- 1 to tries) new Settings(_ => {}) + } + for(i <- 1 to tries * 10) System.setProperty(s"foo$i", i.toString) + Await.result(compiler, duration.Duration.Inf) + } +} diff --git a/tests/neg/selfreq.scala b/tests/neg/selfreq.scala deleted file mode 100644 index 1ca373b4b..000000000 --- a/tests/neg/selfreq.scala +++ /dev/null @@ -1,37 +0,0 @@ -trait X { self: Y => // error: cannot resolve reference to type (Y & X)(X.this).V - - type T <: self.U - - def foo(x: T): T // old-error: cannot resolve reference to type (Y & X)(X.this).V - def foo(x: String): String - -} - -trait Y { self: Z => - - type U <: self.V - -} - -trait Z { - - class V - -} - -object O { - val x: X = ??? - x.foo("a") // error: cannot resolve reference to type (Y & X)(X.this).V -} - -import scala.tools.nsc.interpreter.IMain - -object Test extends dotty.runtime.LegacyApp { - val engine = new IMain.Factory getScriptEngine() - engine.asInstanceOf[IMain].settings.usejavacp.value = true // no longer an error since we unpickle Scala2 inner classes with fixed syms - val res2 = engine.asInstanceOf[javax.script.Compilable] - res2 compile "8" eval() - val res5 = res2 compile """println("hello") ; 8""" - res5 eval() - res5 eval() -} diff --git a/tests/pos-special/i859.scala b/tests/pos-special/i859.scala deleted file mode 100644 index a9f6b51c9..000000000 --- a/tests/pos-special/i859.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Analyzer { - def foo: scala.tools.nsc.Global = ??? -} diff --git a/tests/pos/t5604/ReplConfig.scala b/tests/pos/t5604/ReplConfig.scala deleted file mode 100644 index 8c589eba6..000000000 --- a/tests/pos/t5604/ReplConfig.scala +++ /dev/null @@ -1,53 +0,0 @@ -/* NSC -- new Scala compiler - * Copyright 2005-2011 LAMP/EPFL - * @author Paul Phillips - */ - -package scala.tools.nsc -package interpreter - -import util.Exceptional.unwrap -import util.stackTraceString - -trait ReplConfig { - lazy val replProps = new ReplProps - - class TapMaker[T](x: T) { - def tapInfo(msg: => String): T = tap(x => replinfo(parens(x))) - def tapDebug(msg: => String): T = tap(x => repldbg(parens(x))) - def tapTrace(msg: => String): T = tap(x => repltrace(parens(x))) - def tap[U](f: T => U): T = { - f(x) - x - } - } - - private def parens(x: Any) = "(" + x + ")" - private def echo(msg: => String) = - try Console println msg - catch { case x: AssertionError => Console.println("Assertion error printing debugging output: " + x) } - - private[nsc] def repldbg(msg: => String) = if (isReplDebug) echo(msg) - private[nsc] def repltrace(msg: => String) = if (isReplTrace) echo(msg) - private[nsc] def replinfo(msg: => String) = if (isReplInfo) echo(msg) - - private[nsc] def logAndDiscard[T](label: String, alt: => T): PartialFunction[Throwable, T] = { - case t => - repldbg(label + ": " + unwrap(t)) - repltrace(stackTraceString(unwrap(t))) - alt - } - private[nsc] def substituteAndLog[T](alt: => T)(body: => T): T = - substituteAndLog("" + alt, alt)(body) - private[nsc] def substituteAndLog[T](label: String, alt: => T)(body: => T): T = { - try body - catch logAndDiscard(label, alt) - } - private[nsc] def squashAndLog(label: String)(body: => Unit): Unit = - substituteAndLog(label, ())(body) - - def isReplTrace: Boolean = replProps.trace - def isReplDebug: Boolean = replProps.debug || isReplTrace - def isReplInfo: Boolean = replProps.info || isReplDebug - def isReplPower: Boolean = replProps.power -} diff --git a/tests/pos/t5604/ReplReporter.scala b/tests/pos/t5604/ReplReporter.scala deleted file mode 100644 index 9423efd8a..000000000 --- a/tests/pos/t5604/ReplReporter.scala +++ /dev/null @@ -1,30 +0,0 @@ -/* NSC -- new Scala compiler - * Copyright 2002-2011 LAMP/EPFL - * @author Paul Phillips - */ - -package scala.tools.nsc -package interpreter - -import reporters._ -import IMain._ - -class ReplReporter(intp: IMain) extends ConsoleReporter(intp.settings, Console.in, new ReplStrippingWriter(intp)) { - override def printMessage(msg: String): Unit = { - // Avoiding deadlock if the compiler starts logging before - // the lazy val is complete. - if (intp.isInitializeComplete) { - if (intp.totalSilence) { - if (isReplTrace) - super.printMessage("[silent] " + msg) - } - else super.printMessage(msg) - } - else Console.println("[init] " + msg) - } - - override def displayPrompt(): Unit = { - if (intp.totalSilence) () - else super.displayPrompt() - } -} diff --git a/tests/pos/t5899.scala b/tests/pos/t5899.scala deleted file mode 100644 index 852b4e3e7..000000000 --- a/tests/pos/t5899.scala +++ /dev/null @@ -1,19 +0,0 @@ -import scala.tools.nsc._ - -trait Foo { - val global: Global - import global.{Name, Symbol, nme} - - case class Bippy(name: Name) - - def f(x: Bippy, sym: Symbol): Int = { - // no warning (!) for - // val Stable = sym.name.toTermName - - val Stable = sym.name - Bippy(Stable) match { - case Bippy(nme.WILDCARD) => 1 - case Bippy(Stable) => 2 // should not be considered unreachable - } - } -} diff --git a/tests/pos/t7591.scala b/tests/pos/t7591.scala deleted file mode 100644 index dd127b881..000000000 --- a/tests/pos/t7591.scala +++ /dev/null @@ -1,86 +0,0 @@ -/* NEST (New Scala Test) - * Copyright 2007-2013 LAMP/EPFL - * @author Paul Phillips - */ - -import scala.tools.cmd._ - -/** A sample command specification for illustrative purposes. - * First take advantage of the meta-options: - * - * // this command creates an executable runner script "demo" - * % scala scala.tools.cmd.Demo --self-update demo - * - * // this one creates and sources a completion file - note backticks - * % `./demo --bash` - * - * // and now you have a runner with working completion - * % ./demo -- - * --action --defint --int - * --bash --defstr --str - * --defenv --self-update --unary - * - * The normal option configuration is plausibly self-explanatory. - */ -trait DemoSpec extends Spec with Meta.StdOpts with Interpolation { - lazy val referenceSpec = DemoSpec - lazy val programInfo = Spec.Info("demo", "Usage: demo []", "scala.tools.cmd.Demo") - - help("""Usage: demo []""") - heading("Unary options:") - - val optIsUnary = "unary" / "a unary option" --? ; - ("action" / "a body which may be run") --> println("Hello, I am the --action body.") - - heading("Binary options:") - val optopt = "str" / "an optional String" --| - val optoptInt = ("int" / "an optional Int") . --^[Int] - val optEnv = "defenv" / "an optional String" defaultToEnv "PATH" - val optDefault = "defstr" / "an optional String" defaultTo "default" - val optDefaultInt = "defint" / "an optional Int" defaultTo -1 - val optExpand = "alias" / "an option which expands" expandTo ("--int", "15") -} - -object DemoSpec extends DemoSpec with Property { - lazy val propMapper = new PropertyMapper(DemoSpec) - - type ThisCommandLine = SpecCommandLine - def creator(args: List[String]) = - new SpecCommandLine(args) { - override def errorFn(msg: String) = { println("Error: " + msg) ; sys.exit(0) } - } -} - -class Demo(args: List[String]) extends DemoSpec with Instance { -// TODO NEEDS MANUAL CHANGE (early initializers) -// BEGIN copied early initializers -val parsed = DemoSpec(args: _*) -// END copied early initializers - - import java.lang.reflect._ - - def helpMsg = DemoSpec.helpMsg - def demoSpecMethods = this.getClass.getMethods.toList - private def isDemo(m: Method) = (m.getName startsWith "opt") && !(m.getName contains "$") && (m.getParameterTypes.isEmpty) - - def demoString(ms: List[Method]) = { - val longest = ms map (_.getName.length) max - val formatStr = " %-" + longest + "s: %s" - val xs = ms map (m => formatStr.format(m.getName, m.invoke(this))) - - xs mkString ("Demo(\n ", "\n ", "\n)\n") - } - - override def toString = demoString(demoSpecMethods filter isDemo) -} - -object Demo { - def main(args: Array[String]): Unit = { - val runner = new Demo(args.toList) - - if (args.isEmpty) - println(runner.helpMsg) - - println(runner) - } -} diff --git a/tests/pos/trait-force-info.scala b/tests/pos/trait-force-info.scala deleted file mode 100644 index c2b33869c..000000000 --- a/tests/pos/trait-force-info.scala +++ /dev/null @@ -1,18 +0,0 @@ -/** This does NOT crash unless it's in the interactive package. - */ - -package scala.tools.nsc -package interactive - -trait MyContextTrees { - val self: Global - val NoContext = self.analyzer.NoContext -} -// -// error: java.lang.AssertionError: assertion failed: trait Contexts.NoContext$ linkedModule: List() -// at scala.Predef$.assert(Predef.scala:160) -// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol$1(ClassfileParser.scala:1211) -// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1223) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:489) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:757) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:789) diff --git a/tests/run/t1618.scala b/tests/run/t1618.scala deleted file mode 100644 index 248af9b4f..000000000 --- a/tests/run/t1618.scala +++ /dev/null @@ -1,11 +0,0 @@ - -object Test extends dotty.runtime.LegacyApp { - import scala.tools.nsc.io._ - - val dir: VirtualDirectory = new VirtualDirectory("foo", None) - dir.subdirectoryNamed("foo") - assert(dir.lookupName("foo", true) != null) - -} - - diff --git a/tests/run/t7775.scala b/tests/run/t7775.scala deleted file mode 100644 index bc6a67d0e..000000000 --- a/tests/run/t7775.scala +++ /dev/null @@ -1,17 +0,0 @@ -import scala.concurrent.{duration, Future, Await, ExecutionContext} -import scala.tools.nsc.Settings -import ExecutionContext.Implicits.global - -// Was failing pretty regularly with a ConcurrentModificationException as -// WrappedProperties#systemProperties iterated directly over the mutable -// global system properties map. -object Test { - def main(args: Array[String]): Unit = { - val tries = 1000 // YMMV - val compiler = Future { - for(_ <- 1 to tries) new Settings(_ => {}) - } - for(i <- 1 to tries * 10) System.setProperty(s"foo$i", i.toString) - Await.result(compiler, duration.Duration.Inf) - } -} -- cgit v1.2.3