implement anyframe->T

This commit is contained in:
Techatrix
2023-01-06 14:38:28 +01:00
parent f0c888188a
commit 650eaeb66c
3 changed files with 47 additions and 19 deletions

View File

@@ -92,7 +92,7 @@ test "ComptimeInterpreter - struct" {
const result_struct = interpreter.ip.indexToKey(call_result.result.value.val).struct_type;
try std.testing.expectEqual(@intCast(usize, 1), result_struct.fields.count());
try std.testing.expect(result_struct.fields.contains("slay"));
try std.testing.expectFmt("bool", "{}", .{result_struct.fields.get("slay").?.ty.fmtType(&interpreter.ip)});
try std.testing.expectEqual(@intCast(usize, 1), result_struct.fields.len);
try std.testing.expectEqualStrings("slay", result_struct.fields[0].name);
try std.testing.expectFmt("bool", "{}", .{result_struct.fields[0].ty.fmtType(&interpreter.ip)});
}