Commit Graph

2 Commits

Author SHA1 Message Date
Bob Nystrom
8bb1a94a25 refactor: convert IO from singleton instance to static class with metaclass native methods
Replace the global `io` singleton object with a static `IO` class, moving the `write` native from the instance to the metaclass. Update all benchmark, example, and test files to use `IO.write()` instead of `io.write()`.
2013-12-22 03:25:09 +00:00
Bob Nystrom
1cf8f2d999 feat: add test for infix class expression after constructor call
Add a new test file `test/constructor/infix_class_expression.wren` that verifies
the ability to use an infix operator on a freshly constructed object instance.
The test creates a `Foo` class with a `+` method and checks that `new Foo + "value"`
correctly evaluates to `"Foo value"`. Also includes a TODO comment noting other
constructor expression patterns that should be tested.
2013-12-19 17:10:45 +00:00