Compiler doesn't catch type mismatch with int
and time.Duration
#18873
Labels
Bug
This tag is applied to issues which reports bugs.
Describe the bug
As seen in this commit, the compiler does not catch that
time.Duration
is assigned to anint
field. Compiles without errors and causes runtime exceptions.Expected Behavior
Compiler should raise an error with type mismatch
Current Behavior
No compiler error
Reproduction Steps
Clone https://github.com/Coachonko/sessions, checkout to 8d5c14fba843126ddaf7f6845747819d7a53057a
This problem is solved with commit f9545fbf280f06208eaee899ca4cd6f0135a2022 and diff can be seen for relevant code.
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.4.0 b06811c, timestamp: 2023-07-14 20:44:01 +0300
Environment details (OS name and version, etc.)
The text was updated successfully, but these errors were encountered: