Skip to content

Commit 0a301aa

Browse files
author
Brian Huffman
committed
Fix bug that prevented detection of two jvm_field_is on same field.
Fixes #937.
1 parent e902b54 commit 0a301aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

intTests/test_jvm_setup_errors/test.saw

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ check_fails test "get"
110110
};
111111

112112
print "jvm_field_is with previous jvm_field_is on same field";
113-
KNOWN_FALSE_POSITIVE test "get"
113+
check_fails test "get"
114114
do {
115115
this <- jvm_alloc_object "Test";
116116
val <- jvm_fresh_var "val" java_long;

src/SAWScript/Crucible/JVM/Builtins.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ jvm_field_is ptr fname val =
920920
let cc = st ^. Setup.csCrucibleContext
921921
let cb = cc ^. jccCodebase
922922
let path = Left fname
923-
if st ^. Setup.csPrePost == PreState && MS.testResolved ptr [] rs
923+
if st ^. Setup.csPrePost == PreState && MS.testResolved ptr [path] rs
924924
then X.throwM $ JVMFieldMultiple ptr fname
925925
else Setup.csResolvedState %= MS.markResolved ptr [path]
926926
let env = MS.csAllocations (st ^. Setup.csMethodSpec)

0 commit comments

Comments
 (0)