blob: 84fd16110407d949b03e22e3bc21df518da007c7 [file] [log] [blame]
var createBuiltin = $vm.createBuiltin;
import { shouldBe } from "./resources/assert.js";
import * as ns from "./namespace-object-try-get.js"
function tryGetByIdText(propertyName) { return `(function (base) { return @tryGetById(base, '${propertyName}'); })`; }
function tryGetByIdTextStrict(propertyName) { return `(function (base) { "use strict"; return @tryGetById(base, '${propertyName}'); })`; }
{
let get = createBuiltin(tryGetByIdText("empty"));
noInline(get);
// Do not throw.
shouldBe(get(ns), null);
let getStrict = createBuiltin(tryGetByIdTextStrict("empty"));
noInline(getStrict);
// Do not throw.
shouldBe(getStrict(ns), null);
}
export let empty;