This commit is contained in:
Yuichi Nukiyama 2016-04-19 12:50:50 +00:00
parent fe4058ec48
commit d48f6179f1
5 changed files with 39 additions and 1 deletions

View file

@ -7879,7 +7879,7 @@ const _super = (function (geti, seti) {
node.parent &&
node.parent.kind === SyntaxKind.ArrowFunction &&
(<ArrowFunction>node.parent).body === node &&
compilerOptions.target <= ScriptTarget.ES5) {
languageVersion <= ScriptTarget.ES5) {
return false;
}

View file

@ -0,0 +1,14 @@
//// [singleLineCommentInConciseArrowFunctionES3.ts]
function test() {
return () =>
// some comments here;
123;
}
//// [singleLineCommentInConciseArrowFunctionES3.js]
function test() {
return function () {
// some comments here;
return 123;
};
}

View file

@ -0,0 +1,8 @@
=== tests/cases/compiler/singleLineCommentInConciseArrowFunctionES3.ts ===
function test() {
>test : Symbol(test, Decl(singleLineCommentInConciseArrowFunctionES3.ts, 0, 0))
return () =>
// some comments here;
123;
}

View file

@ -0,0 +1,11 @@
=== tests/cases/compiler/singleLineCommentInConciseArrowFunctionES3.ts ===
function test() {
>test : () => () => number
return () =>
>() => // some comments here; 123 : () => number
// some comments here;
123;
>123 : number
}

View file

@ -0,0 +1,5 @@
function test() {
return () =>
// some comments here;
123;
}