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

Add typing rules for functions/calls #298

Merged
merged 3 commits into from
Jan 31, 2024
Merged

Add typing rules for functions/calls #298

merged 3 commits into from
Jan 31, 2024

Conversation

ajpal
Copy link
Collaborator

@ajpal ajpal commented Jan 29, 2024

No description provided.

@ajpal ajpal requested a review from oflatt January 29, 2024 22:13
((HasType (Arg id) in-ty))
:ruleset type-analysis)

(rule (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a rule that errors when out-ty for the function and out-ty for the body are different

Copy link
Member

@oflatt oflatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work
It's annoying handling the error cases, but it will be valuable I think

((HasType f (FuncT in-ty out-ty)))
:ruleset type-analysis)

(rule (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar: need an error when call type and argument type do not match

"
);
crate::run_test(build, &check)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test or two that test erroring cases

Base automatically changed from ajpal-type-annotations to main January 29, 2024 22:21
Copy link
Member

@oflatt oflatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@oflatt oflatt merged commit 91bf971 into main Jan 31, 2024
4 checks passed
@oflatt oflatt deleted the ajpal-funcs branch January 31, 2024 00:06
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