Description
We designed extensions so that they are not accessible when they are imported with a prefix.
That has already lead to at least two reports of libraries which introduce their own extensions (on their own types), and which people expected to keep working when they imported the library with a prefix.
The reason to not make them accessible was that it provided a way to avoid an extension method conflict while still making explicit application possible. I don't want to lose that property.
I suggest that we loosen the extension resolution so that extensions imported with a prefix are accessible, but we give preference to extensions imported without a prefix.
The rules for extension conflict resolution for applicable extensions E1
and E2
would then be:
E1
is more specific thanE2
ifE2
is only imported through imports with a prefix, andE1
is not,- or both are imported only through prefix imports or neither are, and:
- ... current rules ...
@johnniwinther WDYT?