Skip to content

Commit

Permalink
[truffle] Fix bug in coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jul 6, 2018
1 parent fe22a03 commit f502ee0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/jvm/Truffle.nqp
Expand Up @@ -401,7 +401,7 @@ class QAST::TruffleCompiler {
} elsif $desired == $INT {
return TAST.new($OBJ, ['smart-intify', $tast.tree]);
} elsif $desired == $NUM {
return TAST.new($OBJ, ['smart-numify', $tast.tree]);
return TAST.new($NUM, ['smart-numify', $tast.tree]);
}
}

Expand Down
23 changes: 23 additions & 0 deletions src/vm/jvm/runtime/org/perl6/nqp/truffle/NQPHash.java
@@ -0,0 +1,23 @@
package org.perl6.nqp.truffle.runtime;

import java.util.ArrayList;

public final class NQPHash {
HashMap<String, Object> contents;

public NQPHash() {
this.contents = new new HashMap<String, Object>();

This comment has been minimized.

Copy link
@MasterDuke17

MasterDuke17 Jul 6, 2018

Contributor

"new new"?

}

public Object atkey(String key) {
return contents.get(key);
}

public Object bindkey(String key, Object value) {
return contents.put(key, value);
}

public int elems() {
return contents.size();
}
}

0 comments on commit f502ee0

Please sign in to comment.