fork download
  1. using System;
  2. public module HelloWorld
  3. {
  4. public interface ITest
  5. {
  6. }
  7.  
  8. public class Test[T] where T : struct, new(), ITest
  9. {
  10. public Value : Nullable[T];
  11. }
  12.  
  13. public Main() : void
  14. {
  15. Console.WriteLine("Hello world!");
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.nem:10:8:10:24: error: typing constraint on T not satisfied, upon instantiation of System.Nullable: HelloWorld.ITest is not a subtype of System.ValueType [simple require]
stdout
Standard output is empty