@@ -5,16 +5,16 @@ class C {
static public function f(x:Int) {
switch (x) {
case SOME:
- trace(1);
+ return 'hello';
case _:
- trace(2);
+ return 'world';
}
class Main {
static function main() {
- C.f(1);
- C.f(2);
+ if(C.f(1) != 'hello') throw 'Test C.f(1) failed';
+ if(C.f(2) != 'world') throw 'Test C.f(2) failed';
@@ -1 +1,2 @@
--main Main
+-main Main
+--interp
@@ -1,18 +0,0 @@
-package unit.issues;
-
-class Issue9204 extends unit.Test {
- @:deprecated
- static inline final DEPRECATED = 123;
- function test() {
- eq(1, switchWithDeprecated(123));
- eq(2, switchWithDeprecated(321));
- }
- static public function switchWithDeprecated(x:Int) {
- return switch x {
- case DEPRECATED: 1;
- case _: 2;
-}