Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a HACK to make "foo".WHAT not blow up when calling multi methods.
  • Loading branch information
pmurias committed Jan 24, 2015
1 parent ae81377 commit 378fdc9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vm/js/QAST/Compiler.nqp
Expand Up @@ -953,7 +953,10 @@ class QAST::OperationsJS {

add_simple_op('how', $T_OBJ, [$T_OBJ], sub ($obj) {"$obj._STable.HOW"});
add_simple_op('who', $T_OBJ, [$T_OBJ], sub ($obj) {"$obj._STable.WHO"});
add_simple_op('what', $T_OBJ, [$T_OBJ], sub ($obj) {"$obj._STable.WHAT"});

# HACK
# TODO think what we should return on 1.WHAT and "foo".WHAT
add_simple_op('what', $T_OBJ, [$T_OBJ], sub ($obj) {"($obj._STable ? $obj._STable.WHAT : null)"});

add_simple_op('knowhowattr', $T_OBJ, [], sub () {"nqp.knowhowattr"});

Expand Down

0 comments on commit 378fdc9

Please sign in to comment.