Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ea6bde5

Browse files
srawlinscommit-bot@chromium.org
authored andcommitted
Analyzer: remove unnecessary this in lib/src/generated
Change-Id: I2fb3d84e054bce192604690804f321723730e19f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156603 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
1 parent 207d642 commit ea6bde5

File tree

8 files changed

+35
-35
lines changed

8 files changed

+35
-35
lines changed

pkg/analyzer/lib/src/generated/error_verifier.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ class ErrorVerifier extends RecursiveAstVisitor<void> {
230230
_requiredParametersVerifier = RequiredParametersVerifier(errorReporter),
231231
_duplicateDefinitionVerifier =
232232
DuplicateDefinitionVerifier(_currentLibrary, errorReporter) {
233-
this._isInSystemLibrary = _currentLibrary.source.isInSystemLibrary;
234-
this._hasExtUri = _currentLibrary.hasExtUri;
233+
_isInSystemLibrary = _currentLibrary.source.isInSystemLibrary;
234+
_hasExtUri = _currentLibrary.hasExtUri;
235235
_isInCatchClause = false;
236236
_isInStaticVariableDeclaration = false;
237237
_isInConstructorInitializer = false;

pkg/analyzer/lib/src/generated/java_core.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,17 @@ class PrintStringWriter extends PrintWriter {
161161

162162
abstract class PrintWriter {
163163
void newLine() {
164-
this.print('\n');
164+
print('\n');
165165
}
166166

167167
void print(Object x);
168168

169169
void printf(String fmt, List args) {
170-
this.print(_printf(fmt, args));
170+
print(_printf(fmt, args));
171171
}
172172

173173
void println(String s) {
174-
this.print(s);
175-
this.newLine();
174+
print(s);
175+
newLine();
176176
}
177177
}

pkg/analyzer/lib/src/generated/java_io.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ class JavaFile {
1818
JavaFile.fromUri(Uri uri) : this(path.context.fromUri(uri));
1919
JavaFile.relative(JavaFile base, String child) {
2020
if (child.isEmpty) {
21-
this._path = base._path;
21+
_path = base._path;
2222
} else {
23-
this._path = path.context.join(base._path, child);
23+
_path = path.context.join(base._path, child);
2424
}
2525
}
2626
@override

pkg/analyzer/lib/src/generated/parser.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class Parser {
227227

228228
/// Set the token with which the parse is to begin to the given [token].
229229
set currentToken(Token token) {
230-
this._currentToken = token;
230+
_currentToken = token;
231231
}
232232

233233
/// Return `true` if the parser is to parse asserts in the initializer list of
@@ -293,7 +293,7 @@ class Parser {
293293

294294
/// Set whether parser is to parse function bodies.
295295
set parseFunctionBodies(bool parseFunctionBodies) {
296-
this._parseFunctionBodies = parseFunctionBodies;
296+
_parseFunctionBodies = parseFunctionBodies;
297297
}
298298

299299
/// Return the content of a string with the given literal representation. The

pkg/analyzer/lib/src/generated/resolver.dart

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -292,71 +292,71 @@ class ResolverVisitor extends ScopedVisitor {
292292
: _featureSet = featureSet,
293293
super(definingLibrary, source, typeProvider, errorListener,
294294
nameScope: nameScope) {
295-
this._promoteManager = TypePromotionManager(typeSystem);
296-
this.nullableDereferenceVerifier = NullableDereferenceVerifier(
295+
_promoteManager = TypePromotionManager(typeSystem);
296+
nullableDereferenceVerifier = NullableDereferenceVerifier(
297297
typeSystem: typeSystem,
298298
errorReporter: errorReporter,
299299
);
300-
this.boolExpressionVerifier = BoolExpressionVerifier(
300+
boolExpressionVerifier = BoolExpressionVerifier(
301301
typeSystem: typeSystem,
302302
errorReporter: errorReporter,
303303
nullableDereferenceVerifier: nullableDereferenceVerifier,
304304
);
305-
this._typedLiteralResolver = TypedLiteralResolver(
305+
_typedLiteralResolver = TypedLiteralResolver(
306306
this, _featureSet, typeSystem, typeProvider,
307307
migratableAstInfoProvider: _migratableAstInfoProvider);
308-
this.extensionResolver = ExtensionMemberResolver(this);
309-
this.typePropertyResolver = TypePropertyResolver(this);
310-
this.inferenceHelper = InvocationInferenceHelper(
308+
extensionResolver = ExtensionMemberResolver(this);
309+
typePropertyResolver = TypePropertyResolver(this);
310+
inferenceHelper = InvocationInferenceHelper(
311311
resolver: this,
312312
flowAnalysis: _flowAnalysis,
313313
errorReporter: errorReporter,
314314
typeSystem: typeSystem,
315315
migrationResolutionHooks: migrationResolutionHooks);
316-
this._assignmentExpressionResolver = AssignmentExpressionResolver(
316+
_assignmentExpressionResolver = AssignmentExpressionResolver(
317317
resolver: this,
318318
flowAnalysis: _flowAnalysis,
319319
);
320-
this._binaryExpressionResolver = BinaryExpressionResolver(
320+
_binaryExpressionResolver = BinaryExpressionResolver(
321321
resolver: this,
322322
promoteManager: _promoteManager,
323323
flowAnalysis: _flowAnalysis,
324324
);
325-
this._functionExpressionInvocationResolver =
325+
_functionExpressionInvocationResolver =
326326
FunctionExpressionInvocationResolver(
327327
resolver: this,
328328
);
329-
this._functionExpressionResolver = FunctionExpressionResolver(
329+
_functionExpressionResolver = FunctionExpressionResolver(
330330
resolver: this,
331331
migrationResolutionHooks: migrationResolutionHooks,
332332
flowAnalysis: _flowAnalysis,
333333
promoteManager: _promoteManager,
334334
);
335-
this._forResolver = ForResolver(
335+
_forResolver = ForResolver(
336336
resolver: this,
337337
flowAnalysis: _flowAnalysis,
338338
);
339-
this._postfixExpressionResolver = PostfixExpressionResolver(
339+
_postfixExpressionResolver = PostfixExpressionResolver(
340340
resolver: this,
341341
flowAnalysis: _flowAnalysis,
342342
);
343-
this._prefixExpressionResolver = PrefixExpressionResolver(
343+
_prefixExpressionResolver = PrefixExpressionResolver(
344344
resolver: this,
345345
flowAnalysis: _flowAnalysis,
346346
);
347-
this._yieldStatementResolver = YieldStatementResolver(
347+
_yieldStatementResolver = YieldStatementResolver(
348348
resolver: this,
349349
);
350-
this.nullSafetyDeadCodeVerifier = NullSafetyDeadCodeVerifier(
350+
nullSafetyDeadCodeVerifier = NullSafetyDeadCodeVerifier(
351351
typeSystem,
352352
errorReporter,
353353
_flowAnalysis,
354354
);
355-
this.elementResolver = ElementResolver(this,
355+
elementResolver = ElementResolver(this,
356356
reportConstEvaluationErrors: reportConstEvaluationErrors,
357357
migratableAstInfoProvider: _migratableAstInfoProvider);
358-
this.inferenceContext = InferenceContext._(this);
359-
this.typeAnalyzer = StaticTypeAnalyzer(
358+
inferenceContext = InferenceContext._(this);
359+
typeAnalyzer = StaticTypeAnalyzer(
360360
this, featureSet, _flowAnalysis, migrationResolutionHooks);
361361
}
362362

pkg/analyzer/lib/src/generated/sdk.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class SdkLibraryImpl implements SdkLibrary {
330330

331331
/// Set whether the library is documented.
332332
set documented(bool documented) {
333-
this._documented = documented;
333+
_documented = documented;
334334
}
335335

336336
@override

pkg/analyzer/lib/src/generated/source_io.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class FileBasedSource extends Source {
8484
/// a [uri] is given, then it will be used as the URI from which the source
8585
/// was derived, otherwise a `file:` URI will be created based on the [file].
8686
FileBasedSource(JavaFile file, [Uri uri])
87-
: this.uri = uri ?? file.toURI(),
88-
this.file = file,
87+
: uri = uri ?? file.toURI(),
88+
file = file,
8989
id = _idTable.putIfAbsent(
9090
'${uri ?? file.toURI()}@${file.getPath()}', () => _idTable.length);
9191

pkg/analyzer/lib/src/generated/type_promotion_manager.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,12 @@ class _ResolverVisitor_isVariableAccessedInClosure
313313

314314
@override
315315
void visitFunctionExpression(FunctionExpression node) {
316-
bool inClosure = this._inClosure;
316+
bool inClosure = _inClosure;
317317
try {
318-
this._inClosure = true;
318+
_inClosure = true;
319319
super.visitFunctionExpression(node);
320320
} finally {
321-
this._inClosure = inClosure;
321+
_inClosure = inClosure;
322322
}
323323
}
324324

0 commit comments

Comments
 (0)