Baseline accept

This commit is contained in:
Oleg Mihailik
2017-02-27 01:05:56 +00:00
parent 6a88cf0edf
commit baef2aa2c1
3 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
tests/cases/compiler/evalAfter0.ts(4,2): error TS2695: Left side of comma operator is unused and has no side effects.
==== tests/cases/compiler/evalAfter0.ts (1 errors) ====
(0,eval)("10"); // fine: special case for eval
declare var eva;
(0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something)
~
!!! error TS2695: Left side of comma operator is unused and has no side effects.

View File

@@ -0,0 +1,9 @@
//// [evalAfter0.ts]
(0,eval)("10"); // fine: special case for eval
declare var eva;
(0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something)
//// [evalAfter0.js]
(0, eval)("10"); // fine: special case for eval
(0, eva)("10"); // error: no side effect left of comma (suspect of missing method name or something)

View File

@@ -1,3 +1,4 @@
(0,eval)("10"); // fine: special case for eval
(0,alert)("10"); // error: no side effect left of comma (suspect of missing method name or something)
declare var eva;
(0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something)