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 type unification as part of typecheck. #71

Merged
merged 1 commit into from
Dec 19, 2020
Merged

Add type unification as part of typecheck. #71

merged 1 commit into from
Dec 19, 2020

Conversation

philberty
Copy link
Member

Rust must examine each usage of a name and unify their types. For example:

let mut x;
x = 1

This means the declaration is determined to be an inference variable then
the assignment can be resolved to an Integer TyTy which can be combined
as part of the rules to now make the let x decl be an i32.

#12

Rust must examine each usage of a name and unify their types. For example:

let mut x;
x = 1

This means the declaration is determined to be an inference variable then
the assignment can be resolved to an Integer TyTy which can be combined
as part of the rules to now make the let x decl be an i32.
Copy link
Member

@SimplyTheOther SimplyTheOther left a comment

Choose a reason for hiding this comment

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

PR looks great.

@philberty philberty merged commit 3a10d1f into master Dec 19, 2020
@philberty philberty added this to the Core Datastructures milestone Dec 21, 2020
@philberty philberty deleted the phil/dev branch December 23, 2020 14:11
@philberty philberty linked an issue Jan 3, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Declare first Basic Type inferencing of code within the same file
2 participants