CS0309: constraint has been violated. (possible bug?)
Does anyone know why the following doesn't work?
interface B is derrived from interface A, and should contain an implicit conversion from B to A
error CS0309: The type 'constraint_bug.interface_b<T>' must be convertible to 'constraint_bug.interface_a<constraint_bug.interface_b<T>>'
in order to use it as parameter 'T' in the generic type or method 'constraint_bug.do_something<T>(T)'
class constraint_bug { interface interface_a<T> { T some_func(); } interface interface_b<T> : interface_a<T> staticvoid do_something<T>(T val) where T : interface_a<T> staticvoid do_another_thing<T>(interface_b<T> val) |
adding interface_a<interface_b<T>> as a constraint doesn't help.

