mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
handle empty config structs
This commit is contained in:
@ -194,3 +194,18 @@ fn test_fixed_field() {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
struct Config {
|
||||
n int
|
||||
def int = 10
|
||||
}
|
||||
|
||||
fn foo_config(c Config) {
|
||||
}
|
||||
|
||||
fn test_config() {
|
||||
foo_config({n: 10, def: 20})
|
||||
foo_config({})
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user