mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
fixed size array with const length ([N]int
)
This commit is contained in:
parent
be323e2fb6
commit
aed22a57e3
5 changed files with 17 additions and 9 deletions
|
@ -708,7 +708,7 @@ fn (p mut Parser) const_decl() {
|
|||
// Do not do this when building a module, otherwise the consts
|
||||
// will not be accessible.
|
||||
if p.pref.build_mode != .build_module && is_compile_time_const(p.cgen.cur_line) {
|
||||
p.cgen.consts << '#define $name $p.cgen.cur_line'
|
||||
p.cgen.const_defines << '#define $name $p.cgen.cur_line'
|
||||
p.cgen.resetln('')
|
||||
p.fgen_nl()
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue