Commit Graph
2 Commits
Author SHA1 Message Date
Peter Reijnders 3987db35f7 feat: prevent subclassing of built-in types with runtime error in class creation
Add a check in the interpreter's class creation path that detects when a user-defined class attempts to inherit from any of the seven built-in types (Class, Fiber, Fn, List, Map, Range, String). When such an inheritance is detected, a runtime error is raised with a descriptive message indicating the class name and that it may not subclass a built-in. This implements the restriction discussed in issue #70.

Also adds test files for each built-in type to verify the runtime error is correctly triggered, and includes a commented-out test for closure subclassing that currently causes a segfault.
2015-02-25 19:13:37 +00:00
Peter Reijnders 65366b49d1 feat: add shared library build targets for libwren.so and libwrend.so
Extend the Makefile to produce both static (.a) and shared (.so) library variants for debug and release configurations, updating the clean target and .gitignore accordingly.
2015-01-27 14:05:53 +00:00