Files
Tagir Valeevandintellij-monorepo-bot 15510f839e [java-refactoring] Do not replace null-type with expression type when inlining the variable
Fixes IDEA-376103 Inline method returning 'null' into for-each iterable parameter makes code incompilable

GitOrigin-RevId: 6216652a66ebe3e12285803b4370405be5d5f353
2025-07-18 13:41:55 +00:00

11 lines
164 B
Java

public class InlineNullInForEach {
int[] data() {
return null;
}
void test() {
for (int i : d<caret>ata()) {
System.out.println(i);
}
}
}