Skip to content

Commit

Permalink
Don't check ObjectIdentity if it is infer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ao-senXiong committed May 31, 2024
1 parent 8eb5c37 commit b620abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/pico/inference/PICOInferenceVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public Void visitMethod(MethodTree node, Void p) {
flexibleOverrideChecker(node);

// ObjectIdentityMethod check
if (PICOTypeUtil.isObjectIdentityMethod(node, atypeFactory)) {
if (!infer && PICOTypeUtil.isObjectIdentityMethod(node, atypeFactory)) {
ObjectIdentityMethodEnforcer.check(
atypeFactory.getPath(node.getBody()), (PICOInferenceRealTypeFactory) atypeFactory, checker);
}
Expand Down

0 comments on commit b620abe

Please sign in to comment.