diff --git a/src/ir.cpp b/src/ir.cpp index 440063d58d..5d182fe9b0 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -15982,10 +15982,6 @@ static void ir_make_type_info_defs(IrAnalyze *ira, ConstExprValue *out_val, Scop FnTableEntry *fn_entry = ((TldFn *)curr_entry->value)->fn_entry; assert(!fn_entry->is_test); - analyze_fn_body(ira->codegen, fn_entry); - if (fn_entry->anal_state == FnAnalStateInvalid) - return; - AstNodeFnProto *fn_node = (AstNodeFnProto *)(fn_entry->proto_node); ConstExprValue *fn_def_val = create_const_vals(1); diff --git a/test/cases/type_info.zig b/test/cases/type_info.zig index eee5d1f2ca..05266feb9c 100644 --- a/test/cases/type_info.zig +++ b/test/cases/type_info.zig @@ -233,3 +233,10 @@ fn testFunction() void { fn foo(comptime a: usize, b: bool, args: ...) usize { return 0; } + +test "typeInfo with comptime parameter in struct fn def" { + const S = struct { + pub fn func(comptime x: f32) void {} + }; + comptime var info = @typeInfo(S); +}