1
0
forked from Mirror/wren

Error if a class tries to inherit from null.

Fix #246.
This commit is contained in:
Bob Nystrom
2015-09-12 10:14:04 -07:00
parent e1f979e78a
commit 1a27593993
4 changed files with 32 additions and 39 deletions

View File

@ -164,13 +164,12 @@ OPCODE(CONSTRUCT)
// compiler-generated constructor metaclass methods.
OPCODE(FOREIGN_CONSTRUCT)
// Creates a class. Top of stack is the superclass, or `null` if the class
// inherits Object. Below that is a string for the name of the class. Byte
// [arg] is the number of fields in the class.
// Creates a class. Top of stack is the superclass. Below that is a string for
// the name of the class. Byte [arg] is the number of fields in the class.
OPCODE(CLASS)
// Creates a foreign class. Top of stack is the superclass, or `null` if the
// class inherits Object. Below that is a string for the name of the class.
// Creates a foreign class. Top of stack is the superclass. Below that is a
// string for the name of the class.
OPCODE(FOREIGN_CLASS)
// Define a method for symbol [arg]. The class receiving the method is popped