Boo

Can't use == on nullable types

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.8.2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

>>> Something = null
>>> f as Nullable of System.Single = Something
>>> f
>>> f == null
----^
ERROR: 'is' can't be used with a value type ('System.Nullable`1[[System.Single, mscorlib, Version=2.
0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]')

Issue Links

Activity

Hide
Avishay Lavie added a comment -

The compiler should translate null-tests on nullable types to tests using the HasValue field.
We should also implement some shorthand syntax for Nullable of T, like T? in C#.

Show
Avishay Lavie added a comment - The compiler should translate null-tests on nullable types to tests using the HasValue field. We should also implement some shorthand syntax for Nullable of T, like T? in C#.
Hide
Arron Washington added a comment -

Would love to see this feature!

Show
Arron Washington added a comment - Would love to see this feature!
Hide
Cedric Vivier added a comment -

I've posted an issue about the shorthand syntax to be resolved for 0.8 :
http://jira.codehaus.org/browse/BOO-818

Show
Cedric Vivier added a comment - I've posted an issue about the shorthand syntax to be resolved for 0.8 : http://jira.codehaus.org/browse/BOO-818
Hide
Cedric Vivier added a comment -

I guess we can postpone this to 0.8 since there is no point fixing this before BOO-807 is fixed imho.

Show
Cedric Vivier added a comment - I guess we can postpone this to 0.8 since there is no point fixing this before BOO-807 is fixed imho.
Hide
Cedric Vivier added a comment -

fixed in rev. 2898

Show
Cedric Vivier added a comment - fixed in rev. 2898

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: