mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen,json2: improve -nofloat support (#13117)
This commit is contained in:
@@ -106,8 +106,10 @@ fn (mut p Parser) decode_value() ?Any {
|
||||
kind := p.tok.kind
|
||||
p.next_with_err() ?
|
||||
if p.convert_type {
|
||||
if kind == .float {
|
||||
return Any(tl.f64())
|
||||
$if !nofloat ? {
|
||||
if kind == .float {
|
||||
return Any(tl.f64())
|
||||
}
|
||||
}
|
||||
return Any(tl.i64())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user