spirv: implement arithmeticTypeInfo for Enum (@intToEnum)

This commit is contained in:
Ali Chraghi
2023-05-15 14:22:40 +03:30
parent 9c550721e4
commit f8de4db873
3 changed files with 11 additions and 6 deletions

View File

@@ -27,7 +27,6 @@ const IntToEnumNumber = enum { Zero, One, Two, Three, Four };
test "int to enum" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
try testIntToEnumEval(3);
}
@@ -576,8 +575,6 @@ test "enum literal equality" {
}
test "enum literal cast to enum" {
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
const Color = enum { Auto, Off, On };
var color1: Color = .Auto;
@@ -874,8 +871,6 @@ test "switch on enum with one member is comptime-known" {
}
test "method call on an enum" {
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
const S = struct {
const E = enum {
one,