using System.IO ;
using System;
class Program // for compilation purposes
{
private static void Main( string[ ] args)
{
return ;
}
}
public abstract class Emulator< T> where T : Emulator< T> .EmulatorState
{
public abstract class EmulatorState
{
}
public interface IOpcode
{
}
}
class Chip8 : Emulator< Chip8.Chip8State >
{
public class Chip8State : EmulatorState
{
}
}
abstract class Chip8Opcode< T> : Emulator< T> .IOpcode where T : Chip8.Chip8State
{
}
dXNpbmcgU3lzdGVtLklPOwp1c2luZyBTeXN0ZW07CgpjbGFzcyBQcm9ncmFtIC8vIGZvciBjb21waWxhdGlvbiBwdXJwb3Nlcwp7CiAgICBwcml2YXRlIHN0YXRpYyB2b2lkIE1haW4oc3RyaW5nW10gYXJncykKICAgIHsKICAgICAgICByZXR1cm47CiAgICB9Cn0KCgpwdWJsaWMgYWJzdHJhY3QgY2xhc3MgRW11bGF0b3I8VD4gd2hlcmUgVCA6IEVtdWxhdG9yPFQ+LkVtdWxhdG9yU3RhdGUKewogICAgcHVibGljIGFic3RyYWN0IGNsYXNzIEVtdWxhdG9yU3RhdGUKICAgIHsKICAgIH0KICAgIHB1YmxpYyBpbnRlcmZhY2UgSU9wY29kZQogICAgewogICAgfQp9CgpjbGFzcyBDaGlwOCA6IEVtdWxhdG9yPENoaXA4LkNoaXA4U3RhdGU+CnsKICAgIHB1YmxpYyBjbGFzcyBDaGlwOFN0YXRlIDogRW11bGF0b3JTdGF0ZQogICAgewogICAgfQp9CgphYnN0cmFjdCBjbGFzcyBDaGlwOE9wY29kZTxUPiA6IEVtdWxhdG9yPFQ+LklPcGNvZGUgd2hlcmUgVCA6IENoaXA4LkNoaXA4U3RhdGUKewp9
compilation info
prog.cs(30,16): error CS0314: The type `T' cannot be used as type parameter `T' in the generic type or method `Emulator<T>'. There is no boxing or type parameter conversion from `T' to `Emulator<T>.EmulatorState'
prog.cs(13,32): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout