Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SI-6897, lubs and varargs star.

Don't allow lubs to calculate refinement types which contain
a varargs star outside of legal varargs star position.
  • Loading branch information...
commit 340529410696da2e5110d49a5a8d19572bf272ba 1 parent ca98602
@paulp paulp authored
View
5 src/reflect/scala/reflect/internal/Types.scala
@@ -6801,7 +6801,10 @@ trait Types extends api.Types { self: SymbolTable =>
else lubBase
}
}
- existentialAbstraction(tparams, lubType)
+ // dropRepeatedParamType is a localized fix for SI-6897. We should probably
+ // integrate that transformation at a lower level in master, but lubs are
+ // the likely and maybe only spot they escape, so fixing here for 2.10.1.
+ existentialAbstraction(tparams, dropRepeatedParamType(lubType))
}
if (printLubs) {
println(indent + "lub of " + ts + " at depth "+depth)//debug
View
6 test/files/pos/t6897.scala
@@ -0,0 +1,6 @@
+class A {
+ val html = (null: Any) match {
+ case 1 => <xml:group></xml:group>
+ case 2 => <p></p>
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.