1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 18:48:01 +02:00

Improved casting of typed primitives with conversion operators

This commit is contained in:
Brian Fiete 2022-01-20 16:24:18 -05:00
parent 83bed6b004
commit 633424b6da
2 changed files with 26 additions and 16 deletions

View file

@ -283,7 +283,7 @@ namespace Tests
public static explicit operator MyEnum(Self self)
{
return .Case1;
return .Case2;
}
}
@ -572,9 +572,9 @@ namespace Tests
int32 b = a + 100;
Test.Assert(b == 223);
MyOtherEnum myEnum = .One;
MyEnum me = (MyEnum)myEnum;
Test.Assert(me == .Case1);
MyOtherEnum moe = .One;
MyEnum me = (MyEnum)moe;
Test.Assert(me == .Case2);
//
{