Browse Source

screwy deshadowing logic - failing test case

better-aggressive
Rich-Harris 9 years ago
parent
commit
9fa5e5e783
  1. 4
      test/function/deshadow-top-level-declaration/_config.js
  2. 1
      test/function/deshadow-top-level-declaration/a.js
  3. 5
      test/function/deshadow-top-level-declaration/b.js
  4. 3
      test/function/deshadow-top-level-declaration/foo.js
  5. 5
      test/function/deshadow-top-level-declaration/main.js
  6. 5
      test/function/deshadow-top-level-declaration/x.js

4
test/function/deshadow-top-level-declaration/_config.js

@ -0,0 +1,4 @@
module.exports = {
solo: true,
description: 'deshadows top-level declarations'
};

1
test/function/deshadow-top-level-declaration/a.js

@ -0,0 +1 @@
import './x';

5
test/function/deshadow-top-level-declaration/b.js

@ -0,0 +1,5 @@
import { foo as _foo } from './foo';
export default function foo () {
_foo();
}

3
test/function/deshadow-top-level-declaration/foo.js

@ -0,0 +1,3 @@
function foo () {}
export { foo };

5
test/function/deshadow-top-level-declaration/main.js

@ -0,0 +1,5 @@
import './foo';
import './a';
import b from './b';
assert.equal( typeof b, 'function' );

5
test/function/deshadow-top-level-declaration/x.js

@ -0,0 +1,5 @@
import { foo } from './foo';
function x () {
foo();
}
Loading…
Cancel
Save