Skip to content

Commit c4d00e2

Browse files
srawlinsCommit Queue
authored and
Commit Queue
committed
front_end: replace unsupported [this] comment references with this [Type].
Work towards dart-lang/dartdoc#3761 The analyzer has never recognized `[this]` as a valid doc comment reference (and the `comment_references` lint rule has similarly reported such reference attempts). dartdoc has its own algorithms for resolving comment references, which we are dismantling in favor of a single resolution, provided by the analyzer. We've also decided against adding support in the analyzer (see https://github.com/dart-lang/linter/issues/2079), so these reference attempts should be re-written. Change-Id: I49478bb39f135d87acff4047767743862c6b8551 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365305 Commit-Queue: Johnni Winther <[email protected]> Auto-Submit: Samuel Rawlins <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
1 parent 06dd95b commit c4d00e2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ abstract class IncrementalKernelGenerator {
117117
/// [libraryUri] must refer to either a previously compiled library.
118118
/// [className] may optionally refer to a class within such library to use for
119119
/// the scope of the expression. In that case, [isStatic] indicates whether
120-
/// the scope can access [this].
120+
/// the scope can access this [IncrementalKernelGenerator].
121121
///
122122
/// It is illegal to use "await" in [expression] and the compiled function
123123
/// will always be synchronous.

pkg/front_end/lib/src/fasta/builder/type_alias_builder.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ abstract class TypeAliasBuilder implements TypeDeclarationBuilder {
9090
/// Returns `null` if an error occurred.
9191
///
9292
/// The method substitutes through the chain of type aliases denoted by
93-
/// [this], such that the returned [TypeBuilder]s are appropriate type
94-
/// arguments for passing to the [ClassBuilder] which is the end of the
95-
/// unaliasing chain.
93+
/// this [TypeAliasBuilder], such that the returned [TypeBuilder]s are
94+
/// appropriate type arguments for passing to the [ClassBuilder] which is the
95+
/// end of the unaliasing chain.
9696
// TODO(johnniwinther): Should we enforce that [typeArguments] are non-null
9797
// as stated in the docs? It is not needed for the implementation.
9898
List<TypeBuilder>? unaliasTypeArguments(List<TypeBuilder>? typeArguments);
@@ -521,8 +521,8 @@ abstract class TypeAliasBuilderImpl extends TypeDeclarationBuilderImpl
521521
/// Returns `null` if an error occurred.
522522
///
523523
/// The method substitutes through the chain of type aliases denoted by
524-
/// [this], such that the returned [TypeBuilder]s are appropriate type
525-
/// arguments for passing to the [ClassBuilder] or
524+
/// this [TypeAliasBuilderImpl], such that the returned [TypeBuilder]s are
525+
/// appropriate type arguments for passing to the [ClassBuilder] or
526526
/// [ExtensionTypeDeclarationBuilder] which is the end of the unaliasing
527527
/// chain.
528528
@override

pkg/front_end/lib/src/fasta/compiler_context.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ class CompilerContext {
102102

103103
static bool get isActive => Zone.current[compilerContextKey] != null;
104104

105-
/// Perform [action] in a [Zone] where [this] will be available as
106-
/// `CompilerContext.current`.
105+
/// Perform [action] in a [Zone] where this [CompilerContext] will be
106+
/// available as `CompilerContext.current`.
107107
Future<T> runInContext<T>(Future<T> action(CompilerContext c)) {
108108
return runZoned(
109109
() => new Future<T>.sync(() => action(this)).whenComplete(clear),

pkg/front_end/lib/src/fasta/kernel/member_covariance.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Covariance {
204204
}
205205

206206
/// Returns the merge of this covariance with [other] in which parameters are
207-
/// covariant if they are covariant in either [this] or [other].
207+
/// covariant if they are covariant in either this [Covariance] or [other].
208208
Covariance merge(Covariance other) {
209209
if (identical(this, other)) return this;
210210
List<int>? positionalParameters;
@@ -260,7 +260,7 @@ class Covariance {
260260
}
261261

262262
/// Update [member] to have the covariant flags set with the covariance in
263-
/// [this].
263+
/// this [Covariance].
264264
///
265265
/// No covariance bits are removed from [member] during this process.
266266
void applyCovariance(Member member) {

0 commit comments

Comments
 (0)