What's the reason behind this design? class Super {} class Sub : Super {}
void foo(Super[] sup) {} void main() { Sub[] array;foo(array); // error, cannot call foo(Super[]) with arguments (Sub[])
}
Tobias Pankrath via Digitalmars-d-learn Fri, 20 Feb 2015 00:01:02 -0800
What's the reason behind this design? class Super {} class Sub : Super {}
void foo(Super[] sup) {} void main() { Sub[] array;foo(array); // error, cannot call foo(Super[]) with arguments (Sub[])
}