Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SE-0195, which introduces "Dynamic Member Lookup" Types #14546

Merged
merged 14 commits into from Feb 17, 2018
Merged

Implement SE-0195, which introduces "Dynamic Member Lookup" Types #14546

merged 14 commits into from Feb 17, 2018

Commits on Feb 12, 2018

  1. Implement the recently accepted SE-0195 proposal, which introduces "D…

    …ynamic
    
    Member Lookup" Types.  This is a dusted off and updated version of PR13361,
    which switches from DynamicMemberLookupProtocol to @dynamicMemberLookup as
    was requested by the final review decision.  This also rebases it and
    updates it for other changes in the compiler.
    lattner committed Feb 12, 2018
    Copy the full SHA
    70fc82f View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    12f3f22 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    406ddcf View commit details
    Browse the repository at this point in the history
  4. rename isDynamicMemberLookupable -> hasDynamicMemberLookupAttribute

    per review feedback.
    lattner committed Feb 12, 2018
    Copy the full SHA
    fdd367c View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2018

  1. Fix a bozo bug pointed out by Paul Hudson where we were adding DML re…

    …sults
    
    even when we got normal results.
    lattner committed Feb 14, 2018
    Copy the full SHA
    abb8358 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2018

  1. Fix another problem reported by Paul Hudson, were we dropped substitu…

    …tions
    
    on a ConcreteDeclRefExpr because we were using the wrong locator.
    lattner committed Feb 15, 2018
    Copy the full SHA
    d3cd4b7 View commit details
    Browse the repository at this point in the history
  2. Fix problem passing the wrong locator when dealing with IUO results,

    thanks to Mark Lacey for pointing out this case.
    lattner committed Feb 15, 2018
    Copy the full SHA
    50aa5c7 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    7c8ae1f View commit details
    Browse the repository at this point in the history
  4. fix a problem handling protocol compositions and protocol refinements,

    add a testcase that already works for derived classes overriding the
    subscript.
    
    Thanks to Doug Gregor for both testcases!
    lattner committed Feb 15, 2018
    Copy the full SHA
    4d2e5b9 View commit details
    Browse the repository at this point in the history
  5. Fix a problem where we didn't default the index type of a dynamicMemb…

    …erLookup
    
    to String because there was no LiteralConformsTo constraint.  Also fix a problem
    where we'd dig the incorrect type out of a decl, applying an archetype to the
    resolved string type.  Add testcases to cover some generics cases.
    
    Many thanks to Doug Gregor for the testcases as well as helping me out with one
    of the tricky parts of this patch!
    lattner committed Feb 15, 2018
    Copy the full SHA
    995687d View commit details
    Browse the repository at this point in the history
  6. more cleanups caught by Doug.

    lattner committed Feb 15, 2018
    Copy the full SHA
    b251543 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2018

  1. Copy the full SHA
    a1d7b0a View commit details
    Browse the repository at this point in the history
  2. Add a cache for the 'isDynamicMemberLookup' query to ConstraintSystem…

    … so a type
    
    doesn't get recomputed as the system does backtracking.
    lattner committed Feb 16, 2018
    Copy the full SHA
    3001045 View commit details
    Browse the repository at this point in the history
  3. Implement keypaths for @dynamicMemberLookup results by desugaring them

    to the same form as if the user wrote the subscript out manually.
    lattner committed Feb 16, 2018
    Copy the full SHA
    768e299 View commit details
    Browse the repository at this point in the history