mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +02:00
Null conditional fixes
This commit is contained in:
parent
bb66c77da8
commit
f6752b703d
4 changed files with 15 additions and 1 deletions
|
@ -7,6 +7,7 @@ namespace Tests
|
|||
class CondB
|
||||
{
|
||||
public int mInt = 123;
|
||||
public String mStr;
|
||||
|
||||
public int Val
|
||||
{
|
||||
|
@ -53,6 +54,10 @@ namespace Tests
|
|||
else
|
||||
Test.FatalError();
|
||||
|
||||
Test.Assert(ca?.mCondB?.mStr == null);
|
||||
Test.Assert(!(ca?.mCondB?.mStr?.Length != 0));
|
||||
Test.Assert(!(ca?.mCondB?.mStr?.Length == 0));
|
||||
|
||||
if (let i = ca?.mCondB?.mInt)
|
||||
{
|
||||
Test.Assert(typeof(decltype(i)) == typeof(int));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue