mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 00:20:25 +02:00
23 lines
284 B
Beef
23 lines
284 B
Beef
![]() |
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);
|
||
|
}
|
||
|
}
|
||
|
}
|