importSystem.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'.
Description
importSystem.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.
Greg Nagel added a comment - 08/Jun/08 01:38 PM 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.
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.