Distinct types could not be used with tagof #2152

This commit is contained in:
Christoffer Lerno
2025-05-26 00:57:20 +02:00
parent 8d563eba7a
commit 9461873b4c
6 changed files with 42 additions and 11 deletions

View File

@@ -18,9 +18,8 @@ fn int main()
@.str.2 = private unnamed_addr constant [4 x i8] c"int\00", align 1
@.str.4 = private unnamed_addr constant [7 x i8] c"double\00", align 1
@.str.6 = private unnamed_addr constant [7 x i8] c"String\00", align 1
@.str.6 = private unnamed_addr constant [18 x i8] c"std::core::String\00", align 1
; Function Attrs:
define i32 @main() #0 {
entry:
%varargslots = alloca [1 x %any], align 16
@@ -42,7 +41,7 @@ entry:
%4 = insertvalue %any %3, i64 ptrtoint (ptr @"$ct.String" to i64), 1
store %any %4, ptr %varargslots1, align 16
%5 = call i64 @std.io.printfn(ptr %retparam3, ptr @.str.3, i64 2, ptr %varargslots1, i64 1)
store %"char[]" { ptr @.str.6, i64 6 }, ptr %taddr5, align 8
store %"char[]" { ptr @.str.6, i64 17 }, ptr %taddr5, align 8
%6 = insertvalue %any undef, ptr %taddr5, 0
%7 = insertvalue %any %6, i64 ptrtoint (ptr @"$ct.String" to i64), 1
store %any %7, ptr %varargslots4, align 16