blob: 418d51aa499019aa2469baa5f1fd8e1abd3bf291 [file] [log] [blame]
import Builder from '../Builder.js';
import * as assert from '../assert.js';
{
const builder = (new Builder())
.Type().End()
.Function().End()
.Export()
.Function("foo")
.Function("foo")
.End()
.Code()
.Function("foo", {params: [], ret: "void"})
.End()
.End();
const bin = builder.WebAssembly().get();
assert.throws(() => new WebAssembly.Module(bin), WebAssembly.CompileError, "WebAssembly.Module doesn't parse at byte 31: duplicate export: 'foo'");
}