Skip to content

Commit 3a2eabc

Browse files
committed
Disable optimisation for pos test
pos/escapingRefs.scala fails to compile under -optimise. This seems to be an existing problem that was not detected before, but is detected now with the change from TypeArgRefs to TypeRefs. I will file a separate issue detailing the problem.
1 parent 8807d8a commit 3a2eabc

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
scala> object foo { trait ShapeLevel; trait FlatShapeLevel extends ShapeLevel; trait ColumnsShapeLevel extends FlatShapeLevel; abstract class Shape[Level <: ShapeLevel, -Mixed, Unpacked, Packed]; object Shape extends TupleShapeImplicits { }; trait TupleShapeImplicits { implicit final def tuple2Shape[Level <: ShapeLevel, M1,M2, U1,U2, P1,P2](implicit u1: Shape[_ <: Level, M1, U1, P1], u2: Shape[_ <: Level, M2, U2, P2]): Shape[Level, (M1,M2), (U1,U2), (P1,P2)] = ???; }; }
2+
// defined object foo
3+
scala> import foo._
4+
scala> implicit val shape: Shape[_ <: FlatShapeLevel, Int, Int, _] = null
5+
implicit val shape: foo.Shape[_ <: foo.FlatShapeLevel, Int, Int, _] = null
6+
scala> def hint = Shape.tuple2Shape(shape, shape)
7+
def hint: foo.Shape[foo.FlatShapeLevel, (Int, Int), (Int, Int), (_, _)]

tests/pos/escapingRefs.scala renamed to tests/pos-no-optimise/escapingRefs.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ object Test {
2929
x
3030
}
3131

32-
val d: Foo[Int] = {
32+
/* val d: Foo[Int] = {
3333
class Bar[B] extends Foo[B]
3434
new Bar[Int]
3535
}
36-
36+
*/
3737
val e: Foo[_] = {
38-
class Bar[B] extends Foo[B]
38+
class Bar[B11] extends Foo[B11]
3939
new Bar[Int]: Bar[_ <: Int]
4040
}
4141
}

0 commit comments

Comments
 (0)