Skip to content

Commit bf74e36

Browse files
committed
prepare for singleton variant -> undefined
1. is_type_number has to be adjusted in several ways for singleton variant -- its type is now undefined for non-singleton variant -- it has to still be number 2. Change Lam_compile_const.Const_pointer compilation 3. Check Pisint
1 parent a2a9ed2 commit bf74e36

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

jscomp/runtime/release.ninja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ build runtime/caml_format.cmj : cc_cmi runtime/caml_format.ml | runtime/caml_bui
3232
build runtime/caml_format.cmi : cc runtime/caml_format.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj
3333
build runtime/caml_gc.cmj : cc_cmi runtime/caml_gc.ml | runtime/caml_gc.cmi
3434
build runtime/caml_gc.cmi : cc runtime/caml_gc.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj
35-
build runtime/caml_hash.cmj : cc_cmi runtime/caml_hash.ml | runtime/caml_builtin_exceptions.cmj runtime/caml_hash.cmi runtime/caml_hash_primitive.cmj runtime/caml_nativeint_extern.cmj runtime/caml_obj_extern.cmj runtime/caml_undefined_extern.cmj runtime/js.cmj
35+
build runtime/caml_hash.cmj : cc_cmi runtime/caml_hash.ml | runtime/caml_builtin_exceptions.cmj runtime/caml_hash.cmi runtime/caml_hash_primitive.cmj runtime/caml_nativeint_extern.cmj runtime/caml_obj_extern.cmj runtime/js.cmj
3636
build runtime/caml_hash.cmi : cc runtime/caml_hash.mli | runtime/bs_stdlib_mini.cmi runtime/caml_obj_extern.cmj runtime/js.cmi runtime/js.cmj
3737
build runtime/caml_hash_primitive.cmj : cc_cmi runtime/caml_hash_primitive.ml | runtime/caml_char.cmj runtime/caml_hash_primitive.cmi runtime/caml_int32.cmj runtime/caml_nativeint_extern.cmj runtime/caml_string_extern.cmj
3838
build runtime/caml_hash_primitive.cmi : cc runtime/caml_hash_primitive.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj

jscomp/test/singular_unit_test.ml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
type t = A
2+
3+
let f0 ( x : t) =
4+
match x with
5+
| A as y -> y
6+
7+
let f1 (x : t) =
8+
match x with
9+
| A -> 2
10+
11+
let f3 x =
12+
match x with
13+
| Some (A as y) -> y
14+
| None -> A

0 commit comments

Comments
 (0)