pyret-lang icon indicating copy to clipboard operation
pyret-lang copied to clipboard

Type-checking `because` in a `raises` test results in a compiler error

Open molenzwiebel opened this issue 3 years ago • 0 comments

Simple example:

check:
  1 raises 1 because 1
end

This yields the following error:

The type checker rejected your program because the object type

{check-raises-satisfies :: Bot, check-satisfies-not :: Bot, check-is-not-refinement :: Bot, check-is-roughly :: Bot, check-is-refinement :: Bot, run-checks :: Bot, check-is :: Bot, check-raises-str :: Bot, check-satisfies-delayed :: Bot, check-raises-violates :: Bot, check-raises-not :: Bot, check-raises-other-str :: Bot, check-is-not :: Bot, check-satisfies-not-delayed :: Bot, check-satisfies :: Bot}

does not have a field named check-raises-str-cause

This seems to be because the check desugars to a method call, but one which is not actually in the signature of the current-checker type.

molenzwiebel avatar Jun 10 '21 15:06 molenzwiebel