Skip to content

Infer types for constant expressions #1535

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

Open
wants to merge 8 commits into
base: type-inference-staging
Choose a base branch
from

Conversation

loki259
Copy link
Collaborator

@loki259 loki259 commented Apr 6, 2025

This will add type inference for logical, numeric and string constants 😎

@loki259 loki259 added the typing Deals with the (to-be-created) typing system in flowR label Apr 6, 2025
@loki259 loki259 requested a review from EagleoutIce April 6, 2025 10:39
@loki259 loki259 self-assigned this Apr 6, 2025
}

override foldRString(_node: RString<Info>): TypingInfo {
return RDataType.String;
Copy link
Member

Choose a reason for hiding this comment

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

Just as food for thought: do you want to tag raw strings specifically in the future?

}

override foldRNumber(_node: RNumber<Info>): TypingInfo {
return RDataType.Numeric;
Copy link
Member

Choose a reason for hiding this comment

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

You should do the complex recognition here if you want to separate 1i from 1.
Additionally: How do you want to map values such as NA, NaN etc.?

@EagleoutIce EagleoutIce self-requested a review April 11, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing Deals with the (to-be-created) typing system in flowR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants