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

Replace checker decls with stdlib #739

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

TristonianJones
Copy link
Collaborator

In replacing the checker declarations with the stdlib declarations, a few
small changes have been made which are important to type-checker and
runtime stability.

  • decls.Overload instances are collected to Binding() and to []*exprpb.Decl
    instances in the order they are declared.
  • Merging two decls.Function will preserve overload ordering, with the function
    on the left of the merge taking precedence over the right.
  • Marking a function declaration as disabled or enabled will be preserved across
    function sets
  • Expecting type-guards on a subset of overloads will result in type-guards being
    generated for the entire overload set.

This change also deprecates references to the checker.StandardFunctions() and
checker.StandardTypes().

Also introduces ordering of function overloads based on the
order in which they are specified as options or the order in
which they are merged together. This change ensures that the
type-checker's overload resolution checks will be deterministic.
@TristonianJones TristonianJones merged commit 41fa51e into google:master Jun 13, 2023
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.

2 participants