blob: c229a61d70f0b231ab37dfbb7a7af10c9d1e67ee [file] [log] [blame]
//@ requireOptions("--useClassFields=true")
function assert(a, message) {
if (!a)
throw new Error(message);
}
class A {
foo = function() { };
bar = class {};
baz = "test";
}
var a = new A();
assert(a.foo.name == "foo");
assert(a.bar.name == "bar");
assert(a.baz.name == undefined);