Silent Conversion of u64 to f64 #21778
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: Checker
Bugs/feature requests, that are related to the type checker.
Describe the bug
Compiler quietly converts u64 to f64 in
or
clauseReproduction Steps
strconv.double_minus_infinity
isu64
. This compiles OK but I feel it should be an error because au64
is converted to af64
in the or clauseExpected Behavior
Compiler should issue an error about the conversion.
Current Behavior
Code compiles without warning or error
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.6 fccd7cd
Environment details (OS name and version, etc.)
V full version: V 0.4.6 8215f21.fccd7cd
OS: macos, macOS, 14.5, 23F79
Processor: 8 cpus, 64bit, little endian, Apple M2
getwd: /Users/mike/Documents/github/coreutils/src/sort
vexe: /Users/mike/Documents/github/v/v
vexe mtime: 2024-06-27 19:39:41
vroot: OK, value: /Users/mike/Documents/github/v
VMODULES: OK, value: /Users/mike/.vmodules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.45.2
Git vroot status: weekly.2024.26-11-gfccd7cd0 (11 commit(s) behind V master)
.git/config present: true
CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc status: thirdparty-macos-arm64 5c1d002f
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: