mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Remove isSemicolon (fix #200)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
//// [asiAmbientFunctionDeclaration.ts]
|
||||
declare function foo()
|
||||
|
||||
//// [asiAmbientFunctionDeclaration.js]
|
||||
6
tests/baselines/reference/asiBreak.js
Normal file
6
tests/baselines/reference/asiBreak.js
Normal file
@@ -0,0 +1,6 @@
|
||||
//// [asiBreak.ts]
|
||||
while (true) break
|
||||
|
||||
//// [asiBreak.js]
|
||||
while (true)
|
||||
break;
|
||||
6
tests/baselines/reference/asiContinue.js
Normal file
6
tests/baselines/reference/asiContinue.js
Normal file
@@ -0,0 +1,6 @@
|
||||
//// [asiContinue.ts]
|
||||
while (true) continue
|
||||
|
||||
//// [asiContinue.js]
|
||||
while (true)
|
||||
continue;
|
||||
5
tests/baselines/reference/asiReturn.errors.txt
Normal file
5
tests/baselines/reference/asiReturn.errors.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
==== tests/cases/compiler/asiReturn.ts (1 errors) ====
|
||||
// This should be an error for using a return outside a function, but ASI should work properly
|
||||
return
|
||||
~~~~~~
|
||||
!!! A 'return' statement can only be used within a function body.
|
||||
1
tests/cases/compiler/asiAmbientFunctionDeclaration.ts
Normal file
1
tests/cases/compiler/asiAmbientFunctionDeclaration.ts
Normal file
@@ -0,0 +1 @@
|
||||
declare function foo()
|
||||
1
tests/cases/compiler/asiBreak.ts
Normal file
1
tests/cases/compiler/asiBreak.ts
Normal file
@@ -0,0 +1 @@
|
||||
while (true) break
|
||||
1
tests/cases/compiler/asiContinue.ts
Normal file
1
tests/cases/compiler/asiContinue.ts
Normal file
@@ -0,0 +1 @@
|
||||
while (true) continue
|
||||
2
tests/cases/compiler/asiReturn.ts
Normal file
2
tests/cases/compiler/asiReturn.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// This should be an error for using a return outside a function, but ASI should work properly
|
||||
return
|
||||
Reference in New Issue
Block a user