Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.8.2, 0.9
-
Fix Version/s: 0.9
-
Component/s: None
-
Labels:None
-
Environment:MS.NET / Windows
-
Testcase included:yes
-
Number of attachments :
Description
import System.Threading.Interlocked x as int = 10 CompareExchange(x, 5, 5)
Gives:
{{test.boo(4,16): BCE0055: Internal compiler error: GenericArguments[0], 'System.Int32', on 'T CompareExchange[T](T ByRef, T, T)' violates the constraint of type 'T'.}}
The checking may already be in place to normally disallow this, but there's an integer overload for that function. The real bug is that the compiler picks the generic version over the integer overload.