-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: type-inference-staging
Are you sure you want to change the base?
Conversation
} | ||
|
||
override foldRString(_node: RString<Info>): TypingInfo { | ||
return RDataType.String; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.?
This will add type inference for logical, numeric and string constants 😎