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

Determine type of strings with bidirectional type inference #714

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Conversation

Akuli
Copy link
Owner

@Akuli Akuli commented Jan 28, 2025

Sounds fancy, but it isn't. It just means that when we are type-checking an expression, we have some idea about what we expect the resulting type to be.

For example, if you do foo: byte[100] = "hello", when we type-check the string "hello", the type of the string becomes byte[100]. But if you do foo = "hello" without specifying a type, the type of the string becomes byte*.

Fixes #683

@Akuli Akuli merged commit 2b33658 into main Jan 28, 2025
38 checks passed
@Akuli Akuli deleted the bidir branch January 28, 2025 03:02
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.

Initializing array of array strings
1 participant