Main.hx 328 B

1234567891011121314151617181920
  1. class C {
  2. @:deprecated
  3. static inline final SOME = 1;
  4. static public function f(x:Int) {
  5. switch (x) {
  6. case SOME:
  7. return 'hello';
  8. case _:
  9. return 'world';
  10. }
  11. }
  12. }
  13. class Main {
  14. static function main() {
  15. if(C.f(1) != 'hello') throw 'Test C.f(1) failed';
  16. if(C.f(2) != 'world') throw 'Test C.f(2) failed';
  17. }
  18. }