File tree Expand file tree Collapse file tree 6 files changed +55
-11
lines changed
compiler/test/dotty/tools/dotc Expand file tree Collapse file tree 6 files changed +55
-11
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,10 @@ class CompilationTests extends ParallelTesting {
168168 @ Test def runAll : Unit =
169169 compileFilesInDir(" ../tests/run" , defaultOptions).checkRuns()
170170
171+ // The two tests that current fail under -optimise
172+ @ Test def runNotOptimised : Unit =
173+ compileFilesInDir(" ../tests/run-not-optimised" , defaultOptions.filterNot(" -optimise" .== )).checkRuns()
174+
171175 // Pickling Tests ------------------------------------------------------------
172176 //
173177 // Pickling tests are very memory intensive and as such need to be run with a
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ object O {
2+ case class N ()
3+ object P
4+ }
5+
6+ object Outer {
7+ println(" Outer" )
8+ object Inner {
9+ println(" Inner" )
10+ def i : Unit = {
11+ println(" Inner.i" )
12+ }
13+ }
14+ }
15+
16+ object Test {
17+ def main (args : Array [String ]): Unit = {
18+ Outer .Inner .i // we still don't initialize Outer here (but should we?)
19+
20+ {println(" About to reference Inner.i" ); Outer }.Inner .i // Outer will be initialized.
21+
22+ {println(" About to reference O.N" ); O }.N
23+
24+ {println(" About to reference O.N" ); O }.N
25+
26+ {println(" About to reference O.N.apply()" ); O }.N .apply()
27+ }
28+ }
29+
Original file line number Diff line number Diff line change 1+ import language ._
2+
3+ // Currently typer infers a Nothing as a CC[T] to be Nothing[T], and isn't
4+ // able to figure out that Nothing[Any] =:= Nothing. We've had a discussion
5+ // that it should instead infer CC[T] to be type lambda T => Nothing to be
6+ // kind-correct. #2439
7+
8+ object T7126 {
9+ type T = Any
10+ boom(??? ): Option [T ] // SOE
11+ def boom [CC [U ]](t : CC [T ]): Option [CC [T ]] = None
12+
13+ // okay
14+ foo(??? ): Option [Any ]
15+ def foo [CC [U ]](t : CC [Any ]): Option [CC [Any ]] = None
16+ }
17+
18+ object Test {
19+ def main (args : Array [String ]): Unit = ()
20+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ object O {
33 object P
44}
55
6+ // We assume module initialisation to be pure, running this test under
7+ // -optimise yields different results.
68object Outer {
79 println(" Outer" )
810 object Inner {
You can’t perform that action at this time.
0 commit comments