Skip to content

Commit

Permalink
[js] When the scalar has a Mu type don't type check when putting stuf…
Browse files Browse the repository at this point in the history
…f into it
  • Loading branch information
pmurias committed Aug 1, 2017
1 parent 85a481c commit cbde083
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vm/js/perl6-runtime/runtime.js
Expand Up @@ -340,10 +340,10 @@ module.exports.load = function(nqp, CodeRef, Capture, containerSpecs) {
} else {
value = maybeValue;
let of = desc.$$getattr(ContainerDescriptor, '$!of');
let ok = value.$$istype(ctx, of);
if (ok === 0) {
if (of !== Mu && value.$$istype(ctx, of)=== 0) {
let name = desc.$$getattr_s(ContainerDescriptor, '$!name');
let thrower = getThrower("X::TypeCheck::Assignment");

if (thrower === null) {
ctx.die("Type check failed in assignment to '" + name + "'");
} else {
Expand Down

0 comments on commit cbde083

Please sign in to comment.