{"ScriptPreparationCode":null,"TestCases":[{"Name":"Closure plus class check","Code":"class Foo {}\r\nclass Bar extends Foo {\r\n add(a, b) {\r\n return a \u002B b;\r\n }\r\n}\r\n\r\nfunction apply(ctor, impl, op) {\r\n if (impl instanceof ctor) {\r\n return op(impl);\r\n }\r\n}\r\n\r\nconst bar = new Bar();\r\napply(Bar, bar, impl =\u003E impl.add(3, 5));\r\n","IsDeferred":false},{"Name":"Function apply","Code":"class Foo {}\r\nclass Bar extends Foo {\r\n add(a, b) {\r\n return a \u002B b;\r\n }\r\n}\r\n\r\nconst bar = new Bar();\r\nconst fn = bar[\u0027add\u0027];\r\nif (fn) {\r\n return fn.apply(bar, [3, 5]);\r\n}\r\n","IsDeferred":false}]}