File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,31 @@ function f1(param) {
6161 }
6262}
6363
64+ function f2 ( x ) {
65+ if ( typeof x === "number" ) {
66+ if ( x >= 616641298 ) {
67+ if ( x >= 936370362 ) {
68+ console . log ( x ) ;
69+ return 2 ;
70+ } else {
71+ return 3 ;
72+ }
73+ } else if ( x >= 104 ) {
74+ return 2 ;
75+ } else {
76+ return 333 ;
77+ }
78+ } else {
79+ console . log ( x ) ;
80+ return 2 ;
81+ }
82+ }
83+
6484exports . map = map ;
6585exports . split_cases = split_cases ;
6686exports . f = f ;
6787exports . g1 = g1 ;
6888exports . g = g ;
6989exports . f1 = f1 ;
90+ exports . f2 = f2 ;
7091/* No side effect */
Original file line number Diff line number Diff line change @@ -30,4 +30,13 @@ let rec map f : 'a vlist -> 'b vlist = function
3030
3131 let f1 = function
3232 | `As -> " A"
33- | #abc -> " other" ;;
33+ | #abc -> " other" ;;
34+
35+ type myvariant2 = [`Tag3 of int | `Tag4 | myvariant ]
36+ type x = [`a | `b | `c ]
37+ let f2 x =
38+ match x with
39+ | #myvariant2 as x -> Js. log x ; 2
40+ | `hello -> 3
41+ | `h -> 2
42+ | #x -> 333
You can’t perform that action at this time.
0 commit comments