[swift-dev] 107 lines of "dead" code in ConstraintSystem::performMemberLookup?

Slava Pestov spestov at apple.com
Tue Aug 8 22:45:14 CDT 2017


> On Aug 8, 2017, at 3:34 PM, David Zarzycki via swift-dev <swift-dev at swift.org> wrote:
> 
> In ConstraintSystem::performMemberLookup(), constructors with “simple” names have a dedicated lookup path. In contrast, constructors with compound names are handled by the normal lookup. If I delete this code and let the normal lookup path handle both simple and compound named constructors, I find that all 10,214 validation tests pass on my machine (albeit with slightly different error messages in three test files).

I would suggest running the source compatibility test suite also (see “pull request testing” in https://swift.org/source-compatibility/), but it is quite possible the code is indeed unnecessary.

> 
> Is the test suite missing a test for this code path and if so, what? Or should it be scheduled for deletion after identical error messages can be generated by the normal lookup path?

Are the new error messages worse or just different? If the latter there’s really no requirement to keep them identical.

Slava

> 
> Dave
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev



More information about the swift-dev mailing list