Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
#27 Fixing bug with field access
Browse files Browse the repository at this point in the history
  • Loading branch information
rpeach-sag authored Dec 12, 2018
1 parent 38585ab commit 5d77680
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lambdas/internals/Expression.mon
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ event ExpressionCompiler {

expression := expression.substring(0, i - objectName.length()) + actionPointerName + extraSpace + expression.substring(j + 1, expression.length());
i := i - objectName.length() + actionPointerName.length() - 1 + extraSpace.length();
break;
}
}
j := j + 1;
Expand Down
2 changes: 2 additions & 0 deletions test/tests/FieldAccess/Input/test.mon
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ monitor Test {
.addTest("x => x[1234]", [<any> {1234:1}], 1, "Dictionary integer key field access")

.addTest("x => x[1]", [<any>[1,2,3]], 2, "Sequence value access")

.addTest("xyz => xyz[0] / xyz[1]", [<any>[5,2]], 2.5, "Sequence value access")
.run();
}
}

0 comments on commit 5d77680

Please sign in to comment.