Skip to content

Google sync#1299

Merged
rchen152 merged 3 commits into
mainfrom
google_sync
Oct 5, 2022
Merged

Google sync#1299
rchen152 merged 3 commits into
mainfrom
google_sync

Conversation

@rchen152

@rchen152 rchen152 commented Oct 5, 2022

Copy link
Copy Markdown
Contributor

No description provided.

Improves matcher.compute_matches so that we can switch fully from compute_subst
to compute_matches for SignedFunction and its subclasses (most importantly,
InterpreterFunction!).

* Passes `alias_map` all the way through to compute_one_match to preserve
  aliases in subst.
* Merges `subst` dictionaries when multiple parameters produce non-empty substs
  by factoring out and reusing the matcher's existing code for checking that
  possible TypeVar substitutions are consistent with one another.
* Adds subst deduplication logic so that merging doesn't blow up.
* Tracks seen type parameters in the matcher so that we can access bounds and
  constraints during merging.
* Copies the code for preserving `self` substitutions from compute_subst.
* Sets matcher._error_subst for better error messages.

PiperOrigin-RevId: 478906124
@rchen152 rchen152 merged commit 66032d6 into main Oct 5, 2022
@rchen152 rchen152 deleted the google_sync branch October 5, 2022 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant