History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-805
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Cedric Vivier
Reporter: Ayende Rahien
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

Can't use == on nullable types

Created: 24/Feb/07 04:15 PM   Updated: 06/Apr/08 08:51 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8.2

Time Tracking:
Not Specified

Issue Links:
Related
 
dependent
 


 Description  « Hide
>>> 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]]')

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Avishay Lavie - 07/Apr/07 08:46 AM
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#.

Arron Washington - 07/Apr/07 02:55 PM
Would love to see this feature!

Cedric Vivier - 30/Apr/07 04:08 AM
I've posted an issue about the shorthand syntax to be resolved for 0.8 :
http://jira.codehaus.org/browse/BOO-818

Cedric Vivier - 30/Apr/07 03:13 PM
I guess we can postpone this to 0.8 since there is no point fixing this before BOO-807 is fixed imho.

Cedric Vivier - 06/Apr/08 08:51 AM
fixed in rev. 2898