| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
T _withUnpromotedThisTypeOfEnclosingInstance<T>(T Function() operation) {Personally I would just inline this method at the call sites. I don't think
```
_withUnpromotedThisTypeOfEnclosingInstance(() { ... });
```
is any easier to read or less error prone than just directly doing:
```
_withUnpromotedThisType(enclosingInstanceElement?.thisType, () { ... });
```
(In fact, I think the latter is a little clearer, since it saves the reader from having to go look up the definition of `_withUnpromotedThisTypeOfEnclosingInstance` in order to figure out what `_unpromotedThisType` is being set to).
Your call though.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
T _withUnpromotedThisTypeOfEnclosingInstance<T>(T Function() operation) {Personally I would just inline this method at the call sites. I don't think
```
_withUnpromotedThisTypeOfEnclosingInstance(() { ... });
```is any easier to read or less error prone than just directly doing:
```
_withUnpromotedThisType(enclosingInstanceElement?.thisType, () { ... });
```(In fact, I think the latter is a little clearer, since it saves the reader from having to go look up the definition of `_withUnpromotedThisTypeOfEnclosingInstance` in order to figure out what `_unpromotedThisType` is being set to).
Your call though.
Yeah, I was not sure too.
It probably also goes again the "A Philosophy of Software Design" - too shallow.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
T _withUnpromotedThisTypeOfEnclosingInstance<T>(T Function() operation) {Konstantin ShcheglovPersonally I would just inline this method at the call sites. I don't think
```
_withUnpromotedThisTypeOfEnclosingInstance(() { ... });
```is any easier to read or less error prone than just directly doing:
```
_withUnpromotedThisType(enclosingInstanceElement?.thisType, () { ... });
```(In fact, I think the latter is a little clearer, since it saves the reader from having to go look up the definition of `_withUnpromotedThisTypeOfEnclosingInstance` in order to figure out what `_unpromotedThisType` is being set to).
Your call though.
Yeah, I was not sure too.
It probably also goes again the "A Philosophy of Software Design" - too shallow.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 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/generated/resolver.dart
Insertions: 4, Deletions: 11.
@@ -2476,7 +2476,7 @@
var returnType = element.type.returnType;
_withEnclosingExecutableElement(element, () {
- _withUnpromotedThisTypeOfEnclosingInstance(() {
+ _withUnpromotedThisType(enclosingInstanceElement?.thisType, () {
checkUnreachableNode(node);
node.documentationComment?.accept2(this);
node.metadata.accept2(this);
@@ -2982,7 +2982,7 @@
@override
void visitFieldDeclaration(FieldDeclaration node) {
- _withUnpromotedThisTypeOfEnclosingInstance(() {
+ _withUnpromotedThisType(enclosingInstanceElement?.thisType, () {
checkUnreachableNode(node);
node.visitChildren2(this);
elementResolver.visitFieldDeclaration(node);
@@ -3506,7 +3506,7 @@
var returnType = element.returnType;
_withEnclosingExecutableElement(element, () {
- _withUnpromotedThisTypeOfEnclosingInstance(() {
+ _withUnpromotedThisType(enclosingInstanceElement?.thisType, () {
checkUnreachableNode(node);
node.documentationComment?.accept2(this);
node.metadata.accept2(this);
@@ -3879,7 +3879,7 @@
var returnType = element?.type.returnType;
_withEnclosingExecutableElement(element, () {
- _withUnpromotedThisTypeOfEnclosingInstance(() {
+ _withUnpromotedThisType(enclosingInstanceElement?.thisType, () {
checkUnreachableNode(node);
node.documentationComment?.accept2(this);
node.metadata.accept2(this);
@@ -4831,13 +4831,6 @@
}
}
- T _withUnpromotedThisTypeOfEnclosingInstance<T>(T Function() operation) {
- return _withUnpromotedThisType(
- enclosingInstanceElement?.thisType,
- operation,
- );
- }
-
/// Given an [argumentList] and the [formalParameters] related to the element that
/// will be invoked using those arguments, compute the list of parameters that
/// correspond to the list of arguments.
```
CQ. Switch ResolverVisitor to _withUnpromotedThisType().
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |