mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
Output "undefined" on uninitialized variables
This commit is contained in:
parent
92fc5947fc
commit
821cbd7a1b
@ -1955,6 +1955,8 @@ static int trans_local_declaration(Context *c, TransScope *scope, const DeclStmt
|
||||
if (init_node == nullptr)
|
||||
return ErrorUnexpected;
|
||||
|
||||
} else {
|
||||
init_node = trans_create_node(c, NodeTypeUndefinedLiteral);
|
||||
}
|
||||
AstNode *type_node = trans_qual_type(c, qual_type, stmt->getLocStart());
|
||||
if (type_node == nullptr)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user