na as int? = 30
nb as int? = 12
nn as int? #no value
no as int?
c = 42
assert c == na+nb
assert null == na+nn
try:
c = na+nn
except InvalidOperationException:
print "an nullable arithmetic with one operand without value cannot be cast to an non-nullable"
na *= 2
assert 60 == na
testcase is net2/generics/nullable-3.boo
arithmetic works when all nullables have value.
need to add some temp locals and HasValue tests to handle mixed null/value ops.
(will also optimize nullable==non-null-value tests)