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
..
2014-04-06 15:37:37 +00:00
2014-04-06 15:37:37 +00:00
2015-01-16 05:50:01 +00:00
2015-01-15 14:54:16 +00:00
2015-01-16 03:05:54 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2013-12-20 20:42:11 +00:00
2013-12-20 20:42:11 +00:00
2014-02-10 15:55:14 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-05 20:27:12 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2015-01-23 04:58:22 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-05 20:27:12 +00:00
2015-01-24 22:42:25 +00:00
2015-01-24 04:45:23 +00:00
2014-04-03 02:41:53 +00:00
2014-04-08 14:31:23 +00:00
2014-04-04 14:51:18 +00:00
2014-04-04 14:51:18 +00:00
2015-01-16 05:50:01 +00:00
2014-02-15 01:24:06 +00:00
2015-01-16 08:29:45 +00:00
2015-01-16 08:24:18 +00:00
2015-01-15 15:29:49 +00:00
2015-01-16 08:48:59 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-05 20:27:12 +00:00
2015-02-25 19:13:37 +00:00
2014-01-03 18:47:26 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-02-15 04:10:41 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2015-01-21 02:25:54 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-30 17:12:44 +00:00
2014-01-05 20:27:12 +00:00
2014-04-03 14:48:19 +00:00
2014-02-16 17:20:31 +00:00
2014-04-03 02:41:53 +00:00