class MyClass { def MyClass() { this.set_explicit(true); } }; var o = MyClass(); assert_true(o.is_explicit()); assert_throws("Error: \"'x' is not a function.\"", fun[o](){o.x = 2})