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

[Lang] Support type annotations for literals #4440

Merged
merged 2 commits into from
Mar 4, 2022

Conversation

strongoier
Copy link
Contributor

Related issue = #4230

This PR implements the approach 1 in #4230. After this PR, the way to give a type to a literal is ti.u32(12345678) instead of

a: ti.u32 = 12345678

Of course, you can specify both types of the literal and the variable:

a: ti.u32 = ti.u32(12345678)

@netlify
Copy link

netlify bot commented Mar 3, 2022

✔️ Deploy Preview for docsite-preview ready!

🔨 Explore the source changes: 7f01119

🔍 Inspect the deploy log: https://app.netlify.com/sites/docsite-preview/deploys/62208a8cc881df00076742a5

😎 Browse the preview: https://deploy-preview-4440--docsite-preview.netlify.app

@strongoier
Copy link
Contributor Author

/format

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

4 participants