On Wednesday, 6 December 2017 at 17:04:06 UTC, A Guy With a
Question wrote:
abstract class Test(T)
Here you have a class template.
It does produce there error when I do this:
class Test2
: Test!int
You instantiated the template, so the compiler can now type check
the instantiated class.
class Test
: ITest!int
Same thing here but with an interface template.
I really do think, regardless of if this is considered a
template expansion, that dmd should be catching these obvious
errors. When one writes interfaces and abstract classes they
are generally not ready to implement the end class yet. And
getting a ton of errors at once when that occurs is really hard
to deal with. I really don't understand why the compiler would
have issues with this.
I sympathize, something like Rust's traits or concept-enhanced
C++ could probably do what you want, but D doesn't have this
feature.