1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

expression: set floats as f64 by default

This commit is contained in:
SleepyRoy
2020-03-19 14:24:49 +08:00
committed by GitHub
parent 969765435e
commit f798a0937a
10 changed files with 77 additions and 30 deletions

View File

@ -1,7 +1,7 @@
fn test_fixed_array_can_be_assigned(){
x := 2.32
mut v := [8]f32
mut v := [8]f64
v = [1.0, x, 3.0,4.0,5.0,6.0,7.0,8.0]!!
assert v[1] == x
}
@ -15,7 +15,7 @@ fn test_fixed_array_can_be_used_in_declaration(){
struct Context {
pub mut:
vb [8]f32
vb [8]f64
}
fn test_fixed_array_can_be_assigned_to_a_struct_field(){
mut ctx := Context{}