Skip to content

Commit 82bcd0b

Browse files
committed
[js] Make binding and getting attributes throw an exception
1 parent 5589c31 commit 82bcd0b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/vm/js/nqp-runtime/sixmodel.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@ class STable {
269269
throw new NQPException(`Cannot unbox a type object (${this.$$STable.debugName}) to an str.`);
270270
};
271271

272+
obj.$$getattr = function(classHandle, attrName) {
273+
throw new NQPException(`Cannot look up attributes in a ${this.$$STable.debugName} type object`);
274+
};
275+
276+
obj.$$bindattr = function(classHandle, attrName, value) {
277+
throw new NQPException(`Cannot bind attributes in a ${this.$$STable.debugName} type object`);
278+
};
279+
272280
return obj;
273281
}
274282

0 commit comments

Comments
 (0)