Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Fix accidental removal of `Belt.Result.Ok` and `Belt.Result.Error` constructors in rc.5 https://github.com/rescript-lang/rescript-compiler/pull/6514
- Add missing check that the runtime representation of variants matches implementation and interface. https://github.com/rescript-lang/rescript-compiler/pull/6513/files
- GenType: only export types (not values) from module types. https://github.com/rescript-lang/rescript-compiler/pull/6516
- Fix compiler crash with unboxed variant definition with only 1 constructor. https://github.com/rescript-lang/rescript-compiler/pull/6523

# 11.0.0-rc.7

Expand Down
2 changes: 2 additions & 0 deletions jscomp/ml/typedecl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ let transl_declaration ~typeRecordAsObject env sdecl id =
end;
let unboxed_status =
match sdecl.ptype_kind with
| Ptype_variant [{pcd_args = Pcstr_tuple []; _}] ->
unboxed_false_default_false
| Ptype_variant [{pcd_args = Pcstr_tuple _; _}]
| Ptype_variant [{pcd_args = Pcstr_record
[{pld_mutable = Immutable; _}]; _}]
Expand Down
5 changes: 5 additions & 0 deletions jscomp/test/UntaggedVariants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions jscomp/test/UntaggedVariants.res
Original file line number Diff line number Diff line change
Expand Up @@ -427,3 +427,8 @@ module Aliased = {
}
}
}

module OnlyOne = {
@unboxed type onlyOne = OnlyOne
let onlyOne = OnlyOne
}