Skip to content

Commit 2009dc3

Browse files
committed
Re-enable tasty-interpreter test
Since no more casts are inserted, this means tasty-interpreter runs as before.
1 parent 35a8f93 commit 2009dc3

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,8 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
137137
compileFilesInDir("tests/run-custom-args/tasty-inspector", withTastyInspectorOptions)
138138
)
139139
val tests =
140-
if scala.util.Properties.isWin || true then basicTests
140+
if scala.util.Properties.isWin then basicTests
141141
else compileDir("tests/run-custom-args/tasty-interpreter", withTastyInspectorOptions) :: basicTests
142-
// TODO: Re-enable tasty-interpreter test. The problem is that the interpreter cannot handle a cast that
143-
// is inserted. The cast looks like this
144-
//
145-
// x.$asInstanceOf$[x.type & Matchable]
146-
//
147-
// Note:
148-
//
149-
// - `$asInstanceOf$` instead of `asInstanceOf`, i.e. the compiler-generated cast
150-
// - Matchable does not exist as a Java class
151142

152143
aggregateTests(tests: _*).checkRuns()
153144
}

tests/neg-custom-args/scrutable.scala renamed to tests/neg-custom-args/matchable.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
def foo[T](x: T): Matchable =
2-
println(x.getClass()) // error: should not be scrutinized
3-
println(x.isInstanceOf[Int]) // error: should not be scrutinized
2+
println(x.getClass()) // ok
3+
println(x.isInstanceOf[Int]) // ok
44
x match
55
case x: Int => // error: should not be scrutinized
66
println("int")
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)