This repository has been archived by the owner. It is now read-only.

keywords are not allowed as local specifier in imports #307

merged 1 commit into from Feb 10, 2017


None yet
2 participants
Copy link

danez commented Jan 17, 2017

Bug fix? yes
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? yes
Tests added/pass? yes
Fixed tickets
License MIT

This should not be allowed

import { default } from "foo";

The Identifier is an BindingIdentifier and the spec says not ReservedKeyword

As flow completely overwrites the parsing I also had to change it there.
Furthermore I fixed the implementation in the flow plugin to consider keywords and not only names and also changed parsing Identifier to always do the ReservedKeyword check, so that the error message gets clearer.
Before: Unexpected token (what else would it be?)
After : <keyword> is a reserved word

@danez danez requested review from hzoo and DrewML Jan 17, 2017


This comment has been minimized.

Copy link

codecov-io commented Jan 17, 2017

Current coverage is 97.19% (diff: 100%)

Merging #307 into master will increase coverage by 0.06%

@@             master       #307   diff @@
  Files            21         21          
  Lines          3487       3492     +5   
  Methods         400        400          
  Messages          0          0          
  Branches        896        895     -1   
+ Hits           3387       3394     +7   
+ Misses           44         43     -1   
+ Partials         56         55     -1   

Powered by Codecov. Last update 0a00aff...fe21e06

@danez danez force-pushed the fix-import-keyword branch 2 times, most recently from 50c9845 to a6ad78d Jan 17, 2017

Daniel Tschinder
keywords are not allowed as local specifier
Also fix some error messages to be more specific

@danez danez force-pushed the fix-import-keyword branch from a6ad78d to fe21e06 Jan 20, 2017

@danez danez merged commit 4bd682e into master Feb 10, 2017

4 checks passed

codecov/patch 100% of diff hit (target 97.13%)
codecov/project 97.19% (+0.06%) compared to 0a00aff
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@danez danez deleted the fix-import-keyword branch Feb 10, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.