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

Emit double as return value instead of num #256

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented Jun 17, 2024

Closes #57

In cases where the return type is known to be a double value, prefer double over num so users don't try and downcast the type, which won't work consistently on all compilers. In order to do this, _typeReference is amended to take an extra option 'returnType' which determines if the _RawType is used in a return type context.

Closes dart-lang#57

In cases where the return type is known to be a double
value, prefer double over num so users don't try and
downcast the type, which won't work consistently on
all compilers. In order to do this, _typeReference is
amended to take an extra option 'returnType' which
determines if the `_RawType` is used in a return type
context.
@srujzs srujzs requested a review from sigmundch June 17, 2024 23:51
@kevmoo
Copy link
Member

kevmoo commented Jun 17, 2024

Cool!

Copy link
Member

@sigmundch sigmundch left a comment

Choose a reason for hiding this comment

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

Nice!

srujzs added 2 commits June 17, 2024 20:09
@srujzs srujzs merged commit f6a7d38 into dart-lang:main Jun 18, 2024
9 checks passed
@devoncarew
Copy link
Member

FYI that when rolling this into google3 we ran into failures w/ some new diagnostics (unnecessary cast) in the devtools codebase. This has been addressed upstream in devtools, so package:web can roll in after the next devtools roll (cc @kenzieschmoll).

@kenzieschmoll
Copy link
Contributor

CC @elliette who is on the DevTools release / roll rotation this month.

@elliette
Copy link

The DevTools roll into g3 was just submitted, so package:web should now be unblocked.

@devoncarew
Copy link
Member

Thanks!

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.

Consider using num instead of double for parameter types
6 participants