Ensure that checkGrammarModuleElementContext reliably returns true when there is bad grammar.

This commit is contained in:
Andy Hanson
2016-09-29 06:15:48 -07:00
parent 60ab007d3a
commit 228ddde66e
4 changed files with 25 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
tests/cases/compiler/exportInFunction.ts(3,1): error TS1005: '}' expected.
==== tests/cases/compiler/exportInFunction.ts (1 errors) ====
function f() {
export = 0;
!!! error TS1005: '}' expected.

View File

@@ -0,0 +1,9 @@
//// [exportInFunction.ts]
function f() {
export = 0;
//// [exportInFunction.js]
function f() {
export = 0;
}

View File

@@ -0,0 +1,2 @@
function f() {
export = 0;