1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Allow 'public static int operator implicit(Self self);'

This commit is contained in:
Brian Fiete 2025-02-15 10:38:48 -08:00
parent fa251b3439
commit 94944082eb
3 changed files with 23 additions and 0 deletions

View file

@ -102,6 +102,13 @@ namespace Tests
SDL_BUTTON_LMASK = (1u << ((SDL_BUTTON_LEFT.Underlying) - 1)),
}
public enum EnumL
{
case A;
public static int operator implicit(Self self);
}
[Test]
static void TestBasic()
{
@ -249,6 +256,9 @@ namespace Tests
Test.Assert((int)EnumK.SDL_BUTTON_LMASK == 1);
Test.Assert(typeof(EnumK).Size == 8);
EnumL el = .A;
Test.Assert(el == 0);
}
}
}