Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Side by Side Diff: pkg/analyzer/lib/src/task/strong/info.dart

Issue 1636573003: Update link to super call guideline. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Defines static information collected by the type checker and used later by 5 /// Defines static information collected by the type checker and used later by
6 /// emitters to generate code. 6 /// emitters to generate code.
7 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be 7 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be
8 // refactored to fit into analyzer. 8 // refactored to fit into analyzer.
9 library analyzer.src.task.strong.info; 9 library analyzer.src.task.strong.info;
10 10
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 /// } 427 /// }
428 /// } 428 /// }
429 /// 429 ///
430 /// The order will be Derived.1, Base.1, Derived.2, Base.2, Derived.3; this 430 /// The order will be Derived.1, Base.1, Derived.2, Base.2, Derived.3; this
431 /// ordering preserves the invariant that code can't observe uninitialized 431 /// ordering preserves the invariant that code can't observe uninitialized
432 /// state, however it results in super constructor body not being run 432 /// state, however it results in super constructor body not being run
433 /// immediately after super initializers. Normally this isn't observable, but it 433 /// immediately after super initializers. Normally this isn't observable, but it
434 /// could be if initializers have side effects. 434 /// could be if initializers have side effects.
435 /// 435 ///
436 /// Better to have `super` at the end, as required by the Dart style guide: 436 /// Better to have `super` at the end, as required by the Dart style guide:
437 /// <http://goo.gl/q1T4BB> 437 /// <https://goo.gl/EY6hDP>
438 /// 438 ///
439 /// For now this is the only pattern we support. 439 /// For now this is the only pattern we support.
440 class InvalidSuperInvocation extends StaticError { 440 class InvalidSuperInvocation extends StaticError {
441 InvalidSuperInvocation(SuperConstructorInvocation node) : super(node); 441 InvalidSuperInvocation(SuperConstructorInvocation node) : super(node);
442 442
443 @override 443 @override
444 String get message => "super call must be last in an initializer " 444 String get message => "super call must be last in an initializer "
445 "list (see http://goo.gl/q1T4BB): {0}"; 445 "list (see https://goo.gl/EY6hDP): {0}";
446 446
447 @override 447 @override
448 String get name => 'STRONG_MODE_INVALID_SUPER_INVOCATION'; 448 String get name => 'STRONG_MODE_INVALID_SUPER_INVOCATION';
449 } 449 }
450 450
451 class InvalidVariableDeclaration extends StaticError { 451 class InvalidVariableDeclaration extends StaticError {
452 final DartType expectedType; 452 final DartType expectedType;
453 453
454 InvalidVariableDeclaration( 454 InvalidVariableDeclaration(
455 TypeSystem rules, AstNode declaration, this.expectedType) 455 TypeSystem rules, AstNode declaration, this.expectedType)
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 // TODO(vsm,leafp): Remove this. 578 // TODO(vsm,leafp): Remove this.
579 class UninferredClosure extends DownCast { 579 class UninferredClosure extends DownCast {
580 UninferredClosure(TypeSystem rules, FunctionExpression expression, Cast cast) 580 UninferredClosure(TypeSystem rules, FunctionExpression expression, Cast cast)
581 : super._internal(rules, expression, cast); 581 : super._internal(rules, expression, cast);
582 582
583 @override 583 @override
584 String get name => 'STRONG_MODE_UNINFERRED_CLOSURE'; 584 String get name => 'STRONG_MODE_UNINFERRED_CLOSURE';
585 585
586 toErrorCode() => new StaticTypeWarningCode(name, message); 586 toErrorCode() => new StaticTypeWarningCode(name, message);
587 } 587 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698