cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
892 stars 80 forks source link

Delete `schematype_of_restricted_expr` function #1197

Closed john-h-kastner-aws closed 2 months ago

john-h-kastner-aws commented 2 months ago

Finish removing the buggy schematype_of_restricted_expr function.

This changes regresses on some error messages where we would previously report the "actual" and "expected" type for an expression we now only print the "expected" type and the expression itself. Getting a nice replacement for the "actual" part of the error message wasn't trivial, so I'm put this PR up now for review now. We can discuss what to do with those errors.

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

I confirm that this PR (choose one, and delete the other options):

I confirm that cedar-spec (choose one, and delete the other options):