mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: use type unresolved for unresolved consts
This commit is contained in:
@@ -756,9 +756,9 @@ fn (p mut Parser) const_decl() {
|
||||
if p.first_pass() {
|
||||
p.table.register_const(name, typ, p.mod, is_pub)
|
||||
}
|
||||
// Check to see if this constant exists, and is void. If so, try and get the type again:
|
||||
// Check to see if this constant exists, and is unresolved. If so, try and get the type again:
|
||||
if my_const := p.v.table.find_const(name) {
|
||||
if my_const.typ == 'void' {
|
||||
if my_const.typ == 'unresolved' {
|
||||
for i, v in p.v.table.consts {
|
||||
if v.name == name {
|
||||
p.v.table.consts[i].typ = typ
|
||||
|
||||
Reference in New Issue
Block a user