mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 23:04:09 +02:00
New nullable support
This commit is contained in:
parent
59233cc996
commit
88adb3a1cd
16 changed files with 963 additions and 143 deletions
22
IDEHelper/Tests/src/Nullable.bf
Normal file
22
IDEHelper/Tests/src/Nullable.bf
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
class Nullable
|
||||
{
|
||||
|
||||
[Test]
|
||||
public static void TestPrimitives()
|
||||
{
|
||||
float? fn = 9.0f;
|
||||
int? intn = 100;
|
||||
int? intn2 = null;
|
||||
|
||||
let fn2 = fn + intn;
|
||||
Test.Assert(fn2 == 109);
|
||||
|
||||
let fn3 = fn + intn2;
|
||||
Test.Assert(fn3 == null);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue