mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt struct_field_default_fn_type_value_init_test.v
This commit is contained in:
parent
9de852160a
commit
fa21ac8046
@ -1,5 +1,5 @@
|
||||
struct Flip {
|
||||
name string = 'NULL'
|
||||
name string = 'NULL'
|
||||
execute fn () ! = unsafe { nil }
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ fn (flip Flip) exec() ! {
|
||||
if isnil(flip.execute) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
println('Executing ${flip.name}')
|
||||
flip.execute()!
|
||||
}
|
||||
@ -19,7 +19,7 @@ fn test_struct_field_default_fn_type_value() {
|
||||
println('Hello, World!')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fl.exec()!
|
||||
assert true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user