diff options
| author | John Högberg <[email protected]> | 2019-02-07 08:46:12 +0100 |
|---|---|---|
| committer | John Högberg <[email protected]> | 2019-02-08 15:47:13 +0100 |
| commit | 70aba8f1b77ebb40c9ea39cbcb5f78177c5c1283 (patch) | |
| tree | e387c2de02608b28ca41356fc302f836d7a1e0ad | |
| parent | ccd9450ab0e04744bcd7fa448c810ab3f1dfc946 (diff) | |
| download | otp-70aba8f1b77ebb40c9ea39cbcb5f78177c5c1283.tar.gz otp-70aba8f1b77ebb40c9ea39cbcb5f78177c5c1283.tar.bz2 otp-70aba8f1b77ebb40c9ea39cbcb5f78177c5c1283.zip | |
beam_validator: fconv means we have a number
| -rw-r--r-- | lib/compiler/src/beam_validator.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl index 1d9149e607..a336cf7680 100644 --- a/lib/compiler/src/beam_validator.erl +++ b/lib/compiler/src/beam_validator.erl @@ -539,8 +539,9 @@ valfun_2(_, _) -> %% Handle the remaining floating point instructions here. %% Floating point. -valfun_3({fconv,Src,{fr,_}=Dst}, Vst) -> - assert_term(Src, Vst), +valfun_3({fconv,Src,{fr,_}=Dst}, Vst0) -> + assert_term(Src, Vst0), + Vst = update_type(fun meet/2, number, Src, Vst0), set_freg(Dst, Vst); valfun_3({bif,fadd,_,[_,_]=Ss,Dst}, Vst) -> float_op(Ss, Dst, Vst); |
