Skip to content

Commit

Permalink
[cs] use the type of v in TLocal v instead of the type of TLocal v
Browse files Browse the repository at this point in the history
  • Loading branch information
RealyUniqueName committed Sep 2, 2019
1 parent 0265a4e commit d15bbe0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/codegen/gencommon/hardNullableSynf.ml
Expand Up @@ -127,6 +127,10 @@ let configure gen unwrap_null wrap_val null_to_dynamic has_value opeq_handler =
cur_block := lst;
{ e with eexpr = TBlock(List.rev ret) }
| TCast(v, _) ->
let v = match v.eexpr with
| TLocal l -> { v with etype = l.v_type }
| _ -> v
in
let null_et = is_null_t e.etype in
let null_vt = is_null_t v.etype in
(match null_vt, null_et with
Expand Down
2 changes: 1 addition & 1 deletion std/cs/Flags.hx
Expand Up @@ -38,7 +38,7 @@ abstract Flags<T:EnumValue>(T) from T to T {
the default enum value for an empty flags attribute is specified
**/
extern inline public function new(?initial:T)
this = initial;
this = initial == null ? cast null : initial;

/**
Accessible through the bitwise OR operator (`|`). Returns a new `Flags` type with the flags
Expand Down

0 comments on commit d15bbe0

Please sign in to comment.