ci: fix tools using `import math`, for `const x = i64(-9223372036854775807-1)` fails

pull/11006/head
Delyan Angelov 2021-07-30 17:56:46 +03:00
parent 06d1422a05
commit f67922782e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 0 deletions

View File

@ -5028,6 +5028,9 @@ fn (mut g Gen) const_decl_precomputed(mod string, name string, ct_value ast.Comp
g.const_decl_write_precomputed(styp, cname, ct_value.str())
}
i64 {
if typ == ast.i64_type {
return false
}
if typ == ast.int_type {
// TODO: use g.const_decl_write_precomputed here too.
// For now, use #define macros, so existing code compiles