| 2327 | } |
| 2328 | |
| 2329 | private static final boolean lookupNested(Fields row, Field<?> field) { |
| 2330 | |
| 2331 | // [#15085] [#16721] Help users spot the problem if they accidentally nest row types |
| 2332 | if (row.field(field) != null) |
| 2333 | return true; |
| 2334 | |
| 2335 | for (Field<?> f : row.fields()) { |
| 2336 | if (f instanceof AbstractRowAsField<?> rf) { |
| 2337 | if (lookupNested(rf.fields0(), field)) |
| 2338 | return true; |
| 2339 | } |
| 2340 | } |
| 2341 | |
| 2342 | return false; |
| 2343 | } |
| 2344 | |
| 2345 | static final int indexOrFail(Fields row, Field<?> field) { |
| 2346 | int result = row.indexOf(field); |