Type inference error with DI
Dukc
ajieskola at gmail.com
Mon Sep 27 21:26:28 UTC 2021
On Monday, 27 September 2021 at 19:36:04 UTC, Salih Dincer wrote:
>
> It is thrown an error* because of type object.Object[].
>
> (*) DIsampleFoo.d(34): Error: no property `Str` for type
> `object.Object`
I don't think D will automatically use a common interface as a
base type. Either change `auto test` to `ICon[] test` or make
`ICon` an abstract class, and I think it'll work.
More information about the Digitalmars-d
mailing list