Skip to content

Commit 6a4d226

Browse files
committed
Update tests
1 parent 9bea086 commit 6a4d226

File tree

6 files changed

+22
-15
lines changed

6 files changed

+22
-15
lines changed

tests/init/neg/Desugar.check

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/init/neg/InteractiveDriver.check

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/init/neg/inherit-non-hot.scala

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This is a minimized test for the warning in Names.scala:174
2+
object Foo {
3+
abstract class A {
4+
var b: B = null
5+
def toB: B =
6+
if b == null then b = new B(this) // error
7+
b
8+
}
9+
10+
class B(a: A) {
11+
var aCopy: A = a
12+
def getBAgain: B = aCopy.toB
13+
}
14+
15+
class C extends A {
16+
val bAgain = toB.getBAgain
17+
}
18+
19+
val c = new C
20+
assert(c.b == c.bAgain)
21+
}

tests/init/neg/local-warm4.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,3 @@ object localWarm {
2525
}
2626
val a = new A(5)
2727
}
28-
29-
30-
31-

tests/init/neg/Desugar.scala renamed to tests/init/pos/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ case class C[-T >: Int] (lhs: Int, rhs: Tree[T]) extends A {
99
}
1010

1111
object DesugarError {
12-
val f: PartialFunction[A, Int] = {case C(_, rhs) => rhs.x} // error
12+
val f: PartialFunction[A, Int] = {case C(_, rhs) => rhs.x}
1313
}
1414

1515

0 commit comments

Comments
 (0)