System module format - fixes function hoisting failure case (#8820)

* failing test case

* fix function hoist bug
This commit is contained in:
Guy Bedford
2018-10-08 05:30:02 +02:00
committed by Henry Zhu
parent 850bc1d3dd
commit 3fa4f53d0a
3 changed files with 45 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
var testProp = 'test property';
function testFunc() {
return 'test function';
}
export {
testFunc,
testProp
};

View File

@@ -0,0 +1,18 @@
System.register([], function (_export, _context) {
"use strict";
var testProp;
function testFunc() {
return 'test function';
}
_export("testFunc", testFunc);
return {
setters: [],
execute: function () {
_export("testProp", testProp = 'test property');
}
};
});