mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
10 years ago
10 changed files with 98 additions and 15 deletions
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'passing unbound default export to function cannot rebind it' |
|||
}; |
@ -0,0 +1,14 @@ |
|||
define(function () { 'use strict'; |
|||
|
|||
var foo = function () { |
|||
return 42; |
|||
}; |
|||
|
|||
function bar () { |
|||
return contrivedExample( foo ); |
|||
} |
|||
|
|||
var answer = foo(); |
|||
var somethingElse = bar(); |
|||
|
|||
}); |
@ -0,0 +1,12 @@ |
|||
'use strict'; |
|||
|
|||
var foo = function () { |
|||
return 42; |
|||
}; |
|||
|
|||
function bar () { |
|||
return contrivedExample( foo ); |
|||
} |
|||
|
|||
var answer = foo(); |
|||
var somethingElse = bar(); |
@ -0,0 +1,10 @@ |
|||
var foo = function () { |
|||
return 42; |
|||
}; |
|||
|
|||
function bar () { |
|||
return contrivedExample( foo ); |
|||
} |
|||
|
|||
var answer = foo(); |
|||
var somethingElse = bar(); |
@ -0,0 +1,14 @@ |
|||
(function () { 'use strict'; |
|||
|
|||
var foo = function () { |
|||
return 42; |
|||
}; |
|||
|
|||
function bar () { |
|||
return contrivedExample( foo ); |
|||
} |
|||
|
|||
var answer = foo(); |
|||
var somethingElse = bar(); |
|||
|
|||
})(); |
@ -0,0 +1,18 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
factory(); |
|||
}(this, function () { 'use strict'; |
|||
|
|||
var foo = function () { |
|||
return 42; |
|||
}; |
|||
|
|||
function bar () { |
|||
return contrivedExample( foo ); |
|||
} |
|||
|
|||
var answer = foo(); |
|||
var somethingElse = bar(); |
|||
|
|||
})); |
@ -0,0 +1,9 @@ |
|||
var foo = function () { |
|||
return 42; |
|||
}; |
|||
|
|||
export default foo; |
|||
|
|||
export function bar () { |
|||
return contrivedExample( foo ); |
|||
} |
@ -0,0 +1,4 @@ |
|||
import foo, { bar } from './foo'; |
|||
|
|||
var answer = foo(); |
|||
var somethingElse = bar(); |
@ -1,4 +1,3 @@ |
|||
module.exports = { |
|||
description: 'does not treat property assignment as rebinding for sake of unbound default exports', |
|||
// solo: true
|
|||
description: 'does not treat property assignment as rebinding for sake of unbound default exports' |
|||
}; |
|||
|
Loading…
Reference in new issue