File tree 3 files changed +10
-3
lines changed
sjs-compiler-tests/test/scala/dotty/tools/dotc 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ object ScalaJSLink:
17
17
Semantics .Defaults
18
18
.withAsInstanceOfs(CheckedBehavior .Compliant )
19
19
.withArrayIndexOutOfBounds(CheckedBehavior .Compliant )
20
+ .withArrayStores(CheckedBehavior .Compliant )
21
+ .withNegativeArraySizes(CheckedBehavior .Compliant )
22
+ .withNullPointers(CheckedBehavior .Compliant )
23
+ .withStringIndexOutOfBounds(CheckedBehavior .Compliant )
20
24
.withModuleInit(CheckedBehavior .Compliant )
21
25
end compliantSemantics
22
26
Original file line number Diff line number Diff line change 1
- // scalajs: --skip
1
+ // scalajs: --compliant-semantics
2
2
3
3
/*
4
4
* Try exception handling and finally blocks.
Original file line number Diff line number Diff line change 1
- // scalajs: --skip
1
+ // scalajs: --compliant-semantics
2
2
3
3
object Test extends App {
4
4
@@ -12,9 +12,12 @@ object Test extends App {
12
12
try { println(test8) } catch { case _ : Throwable => println(" OK" ) }
13
13
println(test9)
14
14
println(test10)
15
- println (test11)
15
+ portablePrintln (test11)
16
16
println(test12)
17
17
18
+ def portablePrintln (x : Any ): Unit =
19
+ println(if (x == ()) " ()" else x)
20
+
18
21
def test1 = {
19
22
var x = 1
20
23
try {
You can’t perform that action at this time.
0 commit comments