Files
Chris Tate c257368c5e Compile Effect generators statically (#589)
* Compile Effect generators statically

* test: declare the dormant array write's expected fence
2026-09-30 14:25:29 -05:00

15 lines
499 B
JavaScript

import * as core from "./base.js";
function derive(suffix) {
return class extends core.Base {
constructor(message) { super(message); }
describe() { return super.describe() + suffix; }
};
}
const First = derive("!");
const Second = derive("?");
const first = new First("one");
const second = new Second("two");
console.log(first.describe(), second.describe());
console.log(first instanceof core.Base, first instanceof Error);
console.log(first instanceof First, first instanceof Second);