mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 23:23:37 +01:00
Function type casts/type checks do not handle parameter types and return types #204
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bioball on GitHub (Sep 6, 2024).
This snippet this evaluates to
result = true:It's not possible to typecheck a function type (beyond simply
Function). A better behavior here is probably to just throw an error, because it's impossible to know if above expression should be true or false.However, we should be able to type cast functions. This snippet does not throw, but should:
I'd expect an error like: