Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Fix negative number literal typeannotations #366

Merged
merged 3 commits into from
Feb 20, 2017
Merged

Fix negative number literal typeannotations #366

merged 3 commits into from
Feb 20, 2017

Conversation

danez
Copy link
Member

@danez danez commented Feb 20, 2017

Q A
Bug fix? y
Breaking change? n
New feature? n
Deprecations? n
Spec compliancy? y
Tests added/pass? y
Fixed tickets
License MIT

Currently negative number literal type annotations contain the wrong raw value:

http://astexplorer.net/#/gist/f6cb8e0c848b800f6fdf2e1b64cad131/90e051a59cdf7e4fa88e79c22f6567dc1c451e45

The raw value is "1" instead of "-1". The flow parser is doing the correct thing.

Also use parseLiteral() to parser string and number literal typeannotations
so that future changes (estree) to literals are also reflected to flow.

Also use parseLiteral() to parser string and number literal typeannotations
so that future changes (estree) to literals are also reflected to flow.
@codecov
Copy link

codecov bot commented Feb 20, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@57aacea). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master     #366   +/-   ##
=========================================
  Coverage          ?   97.85%           
=========================================
  Files             ?       21           
  Lines             ?     3495           
  Branches          ?      927           
=========================================
  Hits              ?     3420           
  Misses            ?       29           
  Partials          ?       46
Impacted Files Coverage Δ
src/parser/node.js 100% <100%> (ø)
src/plugins/flow.js 98.08% <100%> (ø)
src/parser/expression.js 97.34% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57aacea...b5f91c9. Read the comment docs.

@danez danez merged commit 2ef00a6 into babel:master Feb 20, 2017
@danez danez deleted the fix-negative-flow branch February 20, 2017 21:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant