Skip to content

Commit

Permalink
[js] Fix message when assigning to a readonly variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jan 16, 2018
1 parent 74c2ab1 commit 1477b6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/js/perl6-runtime/runtime.js
Expand Up @@ -417,7 +417,7 @@ module.exports.load = function(nqp, CodeRef, Capture, containerSpecs) {
let rw = desc === Null ? 0 : desc.$$getattr_i(ContainerDescriptor, '$!rw');

if (!rw) {
if (desc === Null) {
if (desc !== Null) {
let name = desc.$$getattr_s(ContainerDescriptor, '$!name');
ctx.die("Cannot assign to a readonly variable (" + name + ") or a value");
} else {
Expand Down

0 comments on commit 1477b6c

Please sign in to comment.