Вот такой код не компилируется.
namespace TestApplication
{
public class Test[T]
{
variant TestResult
{
|Failed {msg:string}
|Success {res:T}
}
}
}
Ошибки компилятора:
..\TestApplication\Test.n(14,11): error : wrong number of type parameters to `TestResult'
..\TestApplication\Test.n(14,3): error : there is no member named `_N_GetVariantCode' in object with type ?
..\TestApplication\Test.n(14,3): error : unbound name `_N_GetVariantCode' in `x'
..\TestApplication\Test.n(14,11): error : wrong number of type parameters to `TestResult'
..\TestApplication\Test.n(14,3): error : there is no member named `_N_GetVariantCode' in object with type ?
..\TestApplication\Test.n(14,3): error : unbound name `_N_GetVariantCode' in `x'
Done building project "TestApplication.nproj" -- FAILED.