Details
Description
Two issues:
nullable types in Boo don't support implicit casting
nullable types HasValue occasionally flips out.
booish output below:
>>> testVar = Nullable[of long]()
>>> testVar = 3 #int
--------------^
ERROR: Cannot convert 'int' to 'System.Nullable`1[[System.Int64, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.
>>> testVar = 3L #long
3
>>> testVar =
['1'] #assign null value
>>> testVar.HasValue
System.InvalidCastException: Specified cast is not valid.
at Input25Module.Main(String[] argv)
>>> testVar = 4L
4
>>> testVar.HasValue
true
>>>
Third issue is that the compiler does not generate an error when declaring "x as Nullable of string" or other non-valuetype.