Commit-Queue | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
g.m<F<Iterable<int?> Function()>>(); // No error, OK.
Remove these comments.
g.m<F<int? Function()>>(); // No error, OK.
Remove these comments.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks for the review and the suggestions, Johnni. I've updated the CL accordingly.
g.m<F<Iterable<int?> Function()>>(); // No error, OK.
Chloe StefantsovaRemove these comments.
Done
g.m<F<int? Function()>>(); // No error, OK.
Chloe StefantsovaRemove these comments.
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
LGTM
}
Tempting to suggest:
```
extension on Element {
DartType? get referenceType {
final self = this;
return switch (self) {
ConstructorElement() => self.type,
TopLevelFunctionElement() => self.type,
LocalFunctionElement() => self.type,
PropertyAccessorElement() => self.returnType,
MethodElement() => self.type,
VariableElement() => self.type,
_ => null,
};
}
}
```
or `T1() || T2() || ... => self.type` if the types match up.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
lgtm
Tempting to suggest:
```
extension on Element {
DartType? get referenceType {
final self = this;
return switch (self) {
ConstructorElement() => self.type,
TopLevelFunctionElement() => self.type,
LocalFunctionElement() => self.type,
PropertyAccessorElement() => self.returnType,
MethodElement() => self.type,
VariableElement() => self.type,
_ => null,
};
}
}
```
or `T1() || T2() || ... => self.type` if the types match up.
I don't think `T1() || T2() || ... => self.type` works, but `T1(:var type) || T2(:var type) || ... => type` probably does.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +2 |
Thank you Erik and Paul for taking a look and for the suggestions. I've updated the CL accordingly.
Paul BerryTempting to suggest:
```
extension on Element {
DartType? get referenceType {
final self = this;
return switch (self) {
ConstructorElement() => self.type,
TopLevelFunctionElement() => self.type,
LocalFunctionElement() => self.type,
PropertyAccessorElement() => self.returnType,
MethodElement() => self.type,
VariableElement() => self.type,
_ => null,
};
}
}
```
or `T1() || T2() || ... => self.type` if the types match up.
I don't think `T1() || T2() || ... => self.type` works, but `T1(:var type) || T2(:var type) || ... => type` probably does.
Thank you both for the suggestions. I went forward with the option based on the `switch` expression, since the `type` getters don't align on the type perfectly, and I had to use `DartType` in the patterns instead of `var`, which is too wordy IMO.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: pkg/analyzer/lib/src/dart/resolver/function_reference_resolver.dart
Insertions: 10, Deletions: 15.
The diff is too large to show. Please review the diff.
```
[model] Handle local function instantiations in type checks
Closes https://github.com/dart-lang/sdk/issues/61370
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |