mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parent
219079e3a6
commit
af56719f9d
@ -1868,6 +1868,8 @@ pub fn (mut f Fmt) comptime_call(node ast.ComptimeCall) {
|
||||
f.write("\$env('$node.args_var')")
|
||||
} else if node.is_pkgconfig {
|
||||
f.write("\$pkgconfig('$node.args_var')")
|
||||
} else if node.method_name == 'compile_error' {
|
||||
f.write("\$compile_error('$node.args_var')")
|
||||
} else {
|
||||
inner_args := if node.args_var != '' {
|
||||
node.args_var
|
||||
|
3
vlib/v/fmt/tests/comptime_method_args_expected.vv
Normal file
3
vlib/v/fmt/tests/comptime_method_args_expected.vv
Normal file
@ -0,0 +1,3 @@
|
||||
$if !linux {
|
||||
$compile_error('Only Lin\"ux is currently supported')
|
||||
}
|
3
vlib/v/fmt/tests/comptime_method_args_input.vv
Normal file
3
vlib/v/fmt/tests/comptime_method_args_input.vv
Normal file
@ -0,0 +1,3 @@
|
||||
$if !linux {
|
||||
$compile_error("Only Lin\"ux is currently supported")
|
||||
}
|
Loading…
Reference in New Issue
Block a user