/// A non-value source occurrence that denotes an assignment destination.Can you clarify what is meant by "non-value source occurrence"? I'm confused by:
/// A direct assignment using `=`.Can you add a few words here to contrast this with kinds of assignments that are not direct assignments?
/// A [ReachableNamedTargetResolution] describes the operations that can beCan you clarify the difference between `Reachable` and `Unreachable` with some examples? I'm not able to figure out what the difference is.
The AI suggestions seem to say that we use `Unreachable` for invocations whose target type is `Never`, and null-aware invocations whose target type is `Null`. Is that correct? If so, I'm concerned that the `Reachable` vs `Unreachable` nomenclature is going to be confusing, because reachability is a flow analysis concept that's related but not the same. E.g., in the code below, flow analysis considers both `isEven`s to be unreachable, but I believe that the notion you're defining here considers only the second `isEven` to be unreachable:
```
f(int i, Null n) {
if (n != null) {
print(i.isEven);
}
print(n?.isEven);
}
```
Assuming my analysis is correct, I would prefer if we could come up with different terminology than reachable vs. unreachable, to avoid confusion with the flow analysis notion of reachability.
/// The operations resolved for a named assignment target whose access path canOnce we resolve what to do about `NamedTargetResolution` (see my review comment above), I would appreciate if a little more detail could be added to this doc comment, so that a reader doesn't have to refer to the `NamedTargetResolution` doc comment to understand how this differs from `UnreachableNamedTargetResolution`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
/// A non-value source occurrence that denotes an assignment destination.Can you clarify what is meant by "non-value source occurrence"? I'm confused by:
- The meaning of "source occurrence"; is this just another way of saying "AST node"?
- What it means for a source occurrence to "not be a value". Maybe what you mean is that in contrast to an AST node whose runtime behavior includes generating an output value, the runtime behavior of an `AssignmentTarget` includes receiving an input value and storing it at a location (or propagating it to a setter function)?
Done
Can you add a few words here to contrast this with kinds of assignments that are not direct assignments?
Done
/// A [ReachableNamedTargetResolution] describes the operations that can beCan you clarify the difference between `Reachable` and `Unreachable` with some examples? I'm not able to figure out what the difference is.
The AI suggestions seem to say that we use `Unreachable` for invocations whose target type is `Never`, and null-aware invocations whose target type is `Null`. Is that correct? If so, I'm concerned that the `Reachable` vs `Unreachable` nomenclature is going to be confusing, because reachability is a flow analysis concept that's related but not the same. E.g., in the code below, flow analysis considers both `isEven`s to be unreachable, but I believe that the notion you're defining here considers only the second `isEven` to be unreachable:
```
f(int i, Null n) {
if (n != null) {
print(i.isEven);
}
print(n?.isEven);
}
```Assuming my analysis is correct, I would prefer if we could come up with different terminology than reachable vs. unreachable, to avoid confusion with the flow analysis notion of reachability.
I think you are right, it was overcomplicated. I decided to fold everything into single `NamedTargetResolution`, where both `read` and `write` could be `null`.
/// The operations resolved for a named assignment target whose access path canOnce we resolve what to do about `NamedTargetResolution` (see my review comment above), I would appreciate if a little more detail could be added to this doc comment, so that a reader doesn't have to refer to the `NamedTargetResolution` doc comment to understand how this differs from `UnreachableNamedTargetResolution`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Note, I thought some more about it, and will inline `NamedTargetResolution` into assignment targets, as `NamedReadResolution? get readResolution` and `NamedWriteResolution? get writeResolution`. I will ping the CL again, when it is ready.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The refactoring was done.
The CL is ready for review.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The server changes lgtm.
Statement statement = statements.first;I'm not seeing anything to explain why this needs an explicit type, but I'll assume that it's necessary.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Statement statement = statements.first;I'm not seeing anything to explain why this needs an explicit type, but I'll assume that it's necessary.
This is not jump back to API types, so that the type checks below promote.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
AST. Implement DirectAssignment and UnqualifiedNameAssignmentTarget.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |