summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/reflect/internal/Types.scala3
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala4
-rw-r--r--src/library/scala/concurrent/package.scala2
-rw-r--r--test/files/pos/t5729.scala6
4 files changed, 10 insertions, 5 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala
index 026cd35d23..b8346a663d 100644
--- a/src/compiler/scala/reflect/internal/Types.scala
+++ b/src/compiler/scala/reflect/internal/Types.scala
@@ -97,7 +97,7 @@ trait Types extends api.Types { self: SymbolTable =>
*/
private final val propagateParameterBoundsToTypeVars = sys.props contains "scalac.debug.prop-constraints"
- protected val enableTypeVarExperimentals = settings.Xexperimental.value || !settings.XoldPatmat.value
+ protected val enableTypeVarExperimentals = settings.Xexperimental.value
/** Empty immutable maps to avoid allocations. */
private val emptySymMap = immutable.Map[Symbol, Symbol]()
@@ -2898,6 +2898,7 @@ trait Types extends api.Types { self: SymbolTable =>
// existential.
// were we compared to skolems at a higher skolemizationLevel?
// EXPERIMENTAL: value will not be considered unless enableTypeVarExperimentals is true
+ // see SI-5729 for why this is still experimental
private var encounteredHigherLevel = false
private def shouldRepackType = enableTypeVarExperimentals && encounteredHigherLevel
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 8c6c927640..d662a52682 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -354,9 +354,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
// where I need it, and then an override in Global with the setting.
override protected val etaExpandKeepsStar = settings.etaExpandKeepsStar.value
// Here comes another one...
- override protected val enableTypeVarExperimentals = (
- settings.Xexperimental.value || !settings.XoldPatmat.value
- )
+ override protected val enableTypeVarExperimentals = settings.Xexperimental.value
// True if -Xscript has been set, indicating a script run.
def isScriptRun = opt.script.isDefined
diff --git a/src/library/scala/concurrent/package.scala b/src/library/scala/concurrent/package.scala
index 169826034b..e8921ef531 100644
--- a/src/library/scala/concurrent/package.scala
+++ b/src/library/scala/concurrent/package.scala
@@ -26,7 +26,7 @@ package concurrent {
object Await {
private[concurrent] implicit val canAwaitEvidence = new CanAwait {}
- def ready[T <: Awaitable[_]](awaitable: T, atMost: Duration): T = {
+ def ready[T](awaitable: Awaitable[T], atMost: Duration): awaitable.type = {
blocking(awaitable, atMost)
awaitable
}
diff --git a/test/files/pos/t5729.scala b/test/files/pos/t5729.scala
new file mode 100644
index 0000000000..9fd9c9ffbb
--- /dev/null
+++ b/test/files/pos/t5729.scala
@@ -0,0 +1,6 @@
+trait T[X]
+object Test {
+ def join(in: Seq[T[_]]): Int = ???
+ def join[S](in: Seq[T[S]]): String = ???
+ join(null: Seq[T[_]])
+} \ No newline at end of file