Beef icon indicating copy to clipboard operation
Beef copied to clipboard

const T generic argument when T is signed requires 'const' keyword when value is negative.

Open EnokViking opened this issue 1 year ago • 0 comments

public struct MyStruct<T> where T : const int 
{
    ...
}

MyStruct<-1> a; //error
MyStruct<const -1> b; //ok
MyStryct<1> c; //ok

EnokViking avatar Jan 18 '24 11:01 EnokViking