1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-20 00:50:25 +02:00

Fixed assignment operator RHS conversion issue

This commit is contained in:
Brian Fiete 2022-08-03 08:16:41 -07:00
parent e6352571c1
commit 052edbcb8d
2 changed files with 18 additions and 0 deletions

View file

@ -483,6 +483,16 @@ namespace Tests
}
}
class ClassA
{
public String value = new .() ~ delete _;
public void operator+=(StringView value)
{
this.value.Append(value);
}
}
public struct Vector2 : this(float x, float y);
public static Event<Action> sEvent ~ _.Dispose(); // Workaround for the lack of auto-destructor in properties
@ -728,6 +738,11 @@ namespace Tests
rcStr.Release();
//RefCounted<StructB> rcB = .Create();
ClassA ca = scope .();
ca += "ab";
ca += "cd";
Test.Assert(ca.value == "abcd");
}
struct IntStruct