Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1678)

Unified Diff: test/mjsunit/asm/asm-validation.js

Issue 2568773002: [wasm][asm.js] Forbid function declaration replacing variable declaration. (Closed)
Patch Set: git cl try Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/asmjs/test-asm-typer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/asm/asm-validation.js
diff --git a/test/mjsunit/asm/asm-validation.js b/test/mjsunit/asm/asm-validation.js
index 0c9e841fe94ad4b95ac0579b482cf5ed9b41ccb5..ab675aded253d4fec0e3abed5a12f6062b6a72ba 100644
--- a/test/mjsunit/asm/asm-validation.js
+++ b/test/mjsunit/asm/asm-validation.js
@@ -363,3 +363,14 @@ function assertValidAsm(func) {
assertFalse(%IsAsmWasmCode(Module));
assertEquals(43, m.foo(3));
})();
+
+(function TestVarHidesExport() {
+ function Module() {
+ "use asm";
+ var foo;
+ function foo() {}
+ return foo;
+ }
+ Module();
+ assertFalse(%IsAsmWasmCode(Module));
+})();
« no previous file with comments | « test/cctest/asmjs/test-asm-typer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698