We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f6339b commit 1128813Copy full SHA for 1128813
src/interpreter.cc
@@ -1339,6 +1339,16 @@ static void opConditionalOperatorGreaterThan(Program* program)
1339
assert(false && "Should be unreachable");
1340
}
1341
break;
1342
+ // Sonora folks tend to use "object > 0" to test objects for nulls.
1343
+ case VALUE_TYPE_PTR:
1344
+ switch (value[0].opcode) {
1345
+ case VALUE_TYPE_INT:
1346
+ result = (intptr_t)value[1].pointerValue > (intptr_t)value[0].integerValue;
1347
+ break;
1348
+ default:
1349
+ assert(false && "Should be unreachable");
1350
+ }
1351
1352
default:
1353
1354
0 commit comments