import std.stdio;
interface MyInterface { T doAndReturnSomething(T)(T param); } class MyClass : MyInterface { override T doAndReturnSomething(T)(T param) { return param; } } void main() { MyInterface myClass = new MyClass(); writeln(myClass.doAndReturnSomething!(string)("Hello")); } Thanks in advance!