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:
parent
83bed6b004
commit
633424b6da
2 changed files with 26 additions and 16 deletions
|
@ -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);
|
||||
|
||||
//
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue