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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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{}