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 syntax sugar for ti.cast #5515

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

strongoier
Copy link
Contributor

Related issue = close #5470

ti.f32(x) is now a syntax sugar for ti.cast(x, ti.f32) if

  1. x is not a literal;
  2. x doesn't have a compound type.

@netlify
Copy link

netlify bot commented Jul 25, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit da79f3c
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62de5e141666a90008713212
😎 Deploy Preview https://deploy-preview-5515--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@taichi-gardener taichi-gardener added this to In progress in Lang Features & Python Jul 25, 2022
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!

@ailzhang ailzhang merged commit 111178b into taichi-dev:master Jul 25, 2022
Lang Features & Python automation moved this from In progress to Done Jul 25, 2022
@strongoier strongoier deleted the syntax-sugar-cast branch July 25, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support syntax ti.f32(x), ti.f64(x) for variable x
2 participants