DIP66 - Multiple alias this
IGotD-
nise at nise.com
Mon Sep 28 18:22:40 UTC 2020
On Monday, 28 September 2020 at 17:16:31 UTC, 12345swordy wrote:
>
>
> Then by all means created a new thread on this and argue your
> case, as I am not convinced that you think it is easy to
> implement the diamond inheritance detection.
>
> -Alex
First limit multiple alias this to only be valid for basic types
and structs (classes are disqualified for example). Then create a
list of all the types that one alias this type has also searching
that type for alias this types and up in the alias this
hierarchy. If one or more of the same type is found in several
alias this type lists, then abort compilation. Maybe there are
more efficient ways to do this but you get the idea. Am I missing
something?
More information about the Digitalmars-d
mailing list