-
Notifications
You must be signed in to change notification settings - Fork 337
Initial handling of constructor diamond operators #1464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
a1e4bb8
22fb655
e86b344
81f952c
03ce931
dfba3e5
fdf01ee
4446516
dc3a227
471701d
aea98ae
0e2df18
e607850
d1636f7
c6c1e9a
68ad56d
02d32b6
ec32f89
bae860f
e1d8386
89bb268
36ac60c
65fc519
2454efd
df8f89e
82e633e
319f453
1374e89
4babffe
78501f2
2c50426
95ee81d
39898d7
bfd95f7
d50bf7b
bc76012
2883e5a
e321bbc
dc9d2dc
829490a
caa54dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -747,9 +747,9 @@ public static ExprTreeAndState stripParensAndUpdateTreePath( | |
| if (path.getLeaf() != expr) { | ||
| // if the expression is not the leaf of the path, we can't update the path to point to the | ||
| // stripped expression, so we just return the original expression and state | ||
| // return new ExprTreeAndState(expr, state); | ||
| throw new RuntimeException( | ||
| "stripParensAndUpdateTreePath should only be called when the expression is the leaf of the VisitorState's path"); | ||
| // TODO fix all cases where this happens and remove this fallback case | ||
| // Tracked in https://github.com/uber/NullAway/issues/1479 | ||
| return new ExprTreeAndState(expr, state); | ||
| } | ||
|
Comment on lines
+739
to
+756
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When ✏️ Proposed fix- * `@return` the same expression without parentheses, and the updated VisitorState
+ * `@return` if {`@code` expr} is the leaf of {`@code` state}'s path, the expression with enclosing
+ * parentheses stripped and a correspondingly updated {`@link` VisitorState}; otherwise
+ * {`@code` expr} and {`@code` state} unchanged (see TODO in body, tracked in
+ * <a href="https://github.com/uber/NullAway/issues/1479">issue 1479</a>)🤖 Prompt for AI Agents |
||
| ExpressionTree resultExpr = expr; | ||
| while (resultExpr instanceof ParenthesizedTree) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.