restructuring std.Target for OS version ranges, pass 1

This commit is contained in:
Andrew Kelley
2020-02-24 01:38:21 -05:00
parent 68dbba212d
commit fba39ff331
4 changed files with 383 additions and 111 deletions

View File

@@ -3963,7 +3963,7 @@ static void resolve_decl_var(CodeGen *g, TldVar *tld_var, bool allow_lazy) {
// TODO more validation for types that can't be used for export/extern variables
ZigType *implicit_type = nullptr;
if (explicit_type != nullptr && explicit_type->id == ZigTypeIdInvalid) {
if (explicit_type != nullptr && type_is_invalid(explicit_type)) {
implicit_type = explicit_type;
} else if (var_decl->expr) {
init_value = analyze_const_value(g, tld_var->base.parent_scope, var_decl->expr, explicit_type,