[cfe] Handle patches as parts
Change-Id: I50a965b8061572af8a5e408b037648b1f7ff2e0b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413201 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
committed by
Commit Queue
parent
24b14ce246
commit
b9348c7216
@@ -15370,6 +15370,28 @@ const MessageCode messagePatchDeclarationOrigin = const MessageCode(
|
||||
problemMessage: r"""This is the origin declaration.""",
|
||||
);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codePatchExtensionOrigin = messagePatchExtensionOrigin;
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const MessageCode messagePatchExtensionOrigin = const MessageCode(
|
||||
"PatchExtensionOrigin",
|
||||
severity: Severity.context,
|
||||
problemMessage: r"""This is the origin extension.""",
|
||||
);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codePatchExtensionTypeParametersMismatch =
|
||||
messagePatchExtensionTypeParametersMismatch;
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const MessageCode messagePatchExtensionTypeParametersMismatch =
|
||||
const MessageCode(
|
||||
"PatchExtensionTypeParametersMismatch",
|
||||
problemMessage:
|
||||
r"""A patch extension must have the same number of type variables as its origin extension.""",
|
||||
);
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Template<Message Function(String name, Uri uri_)>
|
||||
templatePatchInjectionFailed =
|
||||
|
||||
@@ -1635,7 +1635,6 @@ class IncrementalCompiler implements IncrementalKernelGenerator {
|
||||
List<Library> removedLibraries = <Library>[];
|
||||
bool removedDillBuilders = false;
|
||||
for (Uri uri in potentiallyReferencedLibraries.keys) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (uri.isScheme("package")) continue;
|
||||
LibraryBuilder? builder =
|
||||
currentKernelTarget.loader.deregisterLoadedLibraryBuilder(uri);
|
||||
@@ -1655,12 +1654,13 @@ class IncrementalCompiler implements IncrementalKernelGenerator {
|
||||
_componentProblems.removeLibrary(lib, uriTranslator, partsUsed);
|
||||
|
||||
// Technically this isn't necessary as the uri is not a package-uri.
|
||||
_incrementalSerializer?.invalidate(builder.fileUri);
|
||||
_incrementalSerializer
|
||||
// Coverage-ignore(suite): Not run.
|
||||
?.invalidate(builder.fileUri);
|
||||
}
|
||||
}
|
||||
hierarchy.applyTreeChanges(removedLibraries, const [], const []);
|
||||
if (removedDillBuilders) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
_makeDillLoaderLibrariesUpToDateWithBuildersMap();
|
||||
}
|
||||
|
||||
@@ -1693,7 +1693,6 @@ class IncrementalCompiler implements IncrementalKernelGenerator {
|
||||
[Map<Uri, Source>? uriToSourceExtra,
|
||||
Set<Uri?>? partsUsed]) {
|
||||
uriToSource.remove(builder.fileUri);
|
||||
// Coverage-ignore(suite): Not run.
|
||||
uriToSourceExtra?.remove(builder.fileUri);
|
||||
Library lib = builder.library;
|
||||
for (LibraryPart part in lib.parts) {
|
||||
|
||||
@@ -1237,6 +1237,7 @@ abstract class MergedScope<T extends Builder> {
|
||||
|
||||
SourceLibraryBuilder get originLibrary;
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void _addBuilderToMergedScope(
|
||||
String name, Builder newBuilder, Builder? existingBuilder,
|
||||
{required bool setter, required bool inPatchLibrary}) {
|
||||
@@ -1276,7 +1277,6 @@ abstract class MergedScope<T extends Builder> {
|
||||
? templateNonPatchLibraryConflict.withArguments(name)
|
||||
: templateNonAugmentationLibraryConflict.withArguments(name);
|
||||
} else {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
message = inPatchLibrary
|
||||
? templateNonPatchClassMemberConflict.withArguments(name)
|
||||
: templateNonAugmentationClassMemberConflict
|
||||
@@ -1312,9 +1312,7 @@ abstract class MergedScope<T extends Builder> {
|
||||
} else {
|
||||
message = inPatchLibrary
|
||||
? templateUnmatchedPatchDeclaration.withArguments(name)
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
templateUnmatchedAugmentationDeclaration.withArguments(name);
|
||||
: templateUnmatchedAugmentationDeclaration.withArguments(name);
|
||||
}
|
||||
originLibrary.addProblem(
|
||||
message, newBuilder.fileOffset, name.length, newBuilder.fileUri);
|
||||
@@ -1351,6 +1349,7 @@ abstract class MergedScope<T extends Builder> {
|
||||
if (augmentationMember == null) {
|
||||
augmentationNameSpace.addLocalMember(name, member, setter: setter);
|
||||
if (member is ExtensionBuilder) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentationNameSpace.addExtension(member);
|
||||
}
|
||||
}
|
||||
@@ -1364,7 +1363,9 @@ abstract class MergedScope<T extends Builder> {
|
||||
// `scope.forEachLocalMember`/`scope.forEachLocalSetter`.
|
||||
|
||||
// Include all augmentation scope members to the origin scope.
|
||||
nameSpace.forEachLocalMember((String name, Builder member) {
|
||||
nameSpace.forEachLocalMember(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(String name, Builder member) {
|
||||
// In case of duplicates we use the first declaration.
|
||||
while (member.isDuplicate) {
|
||||
member = member.next!;
|
||||
@@ -1374,6 +1375,7 @@ abstract class MergedScope<T extends Builder> {
|
||||
setter: false, inPatchLibrary: inPatchLibrary);
|
||||
});
|
||||
if (augmentations != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (String augmentedName in augmentations.keys) {
|
||||
for (Builder augmentation in augmentations[augmentedName]!) {
|
||||
_addBuilderToMergedScope(augmentedName, augmentation,
|
||||
@@ -1382,7 +1384,9 @@ abstract class MergedScope<T extends Builder> {
|
||||
}
|
||||
}
|
||||
}
|
||||
nameSpace.forEachLocalSetter((String name, Builder member) {
|
||||
nameSpace.forEachLocalSetter(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(String name, Builder member) {
|
||||
// In case of duplicates we use the first declaration.
|
||||
while (member.isDuplicate) {
|
||||
member = member.next!;
|
||||
@@ -1392,6 +1396,7 @@ abstract class MergedScope<T extends Builder> {
|
||||
setter: true, inPatchLibrary: inPatchLibrary);
|
||||
});
|
||||
if (setterAugmentations != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (String augmentedName in setterAugmentations.keys) {
|
||||
for (Builder augmentation in setterAugmentations[augmentedName]!) {
|
||||
_addBuilderToMergedScope(augmentedName, augmentation,
|
||||
@@ -1400,7 +1405,9 @@ abstract class MergedScope<T extends Builder> {
|
||||
}
|
||||
}
|
||||
}
|
||||
nameSpace.forEachLocalExtension((ExtensionBuilder extensionBuilder) {
|
||||
nameSpace.forEachLocalExtension(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(ExtensionBuilder extensionBuilder) {
|
||||
if (extensionBuilder is SourceExtensionBuilder &&
|
||||
extensionBuilder.isUnnamedExtension) {
|
||||
_originNameSpace.addExtension(extensionBuilder);
|
||||
@@ -1420,7 +1427,9 @@ abstract class MergedScope<T extends Builder> {
|
||||
_addBuilderToAugmentationNameSpace(nameSpace, name, originMember,
|
||||
setter: true);
|
||||
});
|
||||
_originNameSpace.forEachLocalExtension((ExtensionBuilder extensionBuilder) {
|
||||
_originNameSpace.forEachLocalExtension(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(ExtensionBuilder extensionBuilder) {
|
||||
if (extensionBuilder is SourceExtensionBuilder &&
|
||||
extensionBuilder.isUnnamedExtension) {
|
||||
nameSpace.addExtension(extensionBuilder);
|
||||
@@ -1433,6 +1442,7 @@ abstract class MergedScope<T extends Builder> {
|
||||
bool _allowInjectedPublicMember(Builder newBuilder);
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
class MergedLibraryScope extends MergedScope<SourceLibraryBuilder> {
|
||||
MergedLibraryScope(SourceLibraryBuilder origin)
|
||||
: super(origin, origin.libraryNameSpace);
|
||||
@@ -1464,11 +1474,14 @@ class MergedClassMemberScope extends MergedScope<SourceClassBuilder> {
|
||||
super(origin, origin.nameSpace);
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
SourceLibraryBuilder get originLibrary => _origin.libraryBuilder;
|
||||
|
||||
void _addAugmentationConstructorScope(DeclarationNameSpace nameSpace,
|
||||
{required bool inPatchLibrary}) {
|
||||
nameSpace.forEachConstructor((String name, MemberBuilder newConstructor) {
|
||||
nameSpace.forEachConstructor(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(String name, MemberBuilder newConstructor) {
|
||||
MemberBuilder? existingConstructor =
|
||||
_originConstructorNameSpace.lookupConstructor(name);
|
||||
bool isAugmentationBuilder = inPatchLibrary
|
||||
@@ -1483,9 +1496,7 @@ class MergedClassMemberScope extends MergedScope<SourceClassBuilder> {
|
||||
inPatchLibrary
|
||||
? templateNonPatchConstructorConflict
|
||||
.withArguments(newConstructor.fullNameForErrors)
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
templateNonAugmentationConstructorConflict
|
||||
: templateNonAugmentationConstructorConflict
|
||||
.withArguments(newConstructor.fullNameForErrors),
|
||||
newConstructor.fileOffset,
|
||||
noLength,
|
||||
@@ -1503,9 +1514,7 @@ class MergedClassMemberScope extends MergedScope<SourceClassBuilder> {
|
||||
inPatchLibrary
|
||||
? templateUnmatchedPatchConstructor
|
||||
.withArguments(newConstructor.fullNameForErrors)
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
templateUnmatchedAugmentationConstructor
|
||||
: templateUnmatchedAugmentationConstructor
|
||||
.withArguments(newConstructor.fullNameForErrors),
|
||||
newConstructor.fileOffset,
|
||||
noLength,
|
||||
@@ -1514,7 +1523,6 @@ class MergedClassMemberScope extends MergedScope<SourceClassBuilder> {
|
||||
_originConstructorNameSpace.addConstructor(name, newConstructor);
|
||||
for (DeclarationNameSpace augmentationConstructorNameSpace
|
||||
in _augmentationConstructorNameSpaces.values) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
_addConstructorToAugmentationScope(
|
||||
augmentationConstructorNameSpace, name, newConstructor);
|
||||
}
|
||||
@@ -1522,7 +1530,6 @@ class MergedClassMemberScope extends MergedScope<SourceClassBuilder> {
|
||||
if (inPatchLibrary &&
|
||||
!name.startsWith('_') &&
|
||||
!_allowInjectedPublicMember(newConstructor)) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
originLibrary.addProblem(
|
||||
templatePatchInjectionFailed.withArguments(
|
||||
name, originLibrary.importUri),
|
||||
@@ -1561,13 +1568,13 @@ class MergedClassMemberScope extends MergedScope<SourceClassBuilder> {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool _allowInjectedPublicMember(Builder newBuilder) {
|
||||
if (originLibrary.importUri.isScheme("dart") &&
|
||||
originLibrary.importUri.path.startsWith("_")) {
|
||||
return true;
|
||||
}
|
||||
if (newBuilder.isStatic) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
return _origin.name.startsWith('_');
|
||||
}
|
||||
// TODO(johnniwinther): Restrict the use of injected public class members.
|
||||
@@ -1576,10 +1583,10 @@ class MergedClassMemberScope extends MergedScope<SourceClassBuilder> {
|
||||
}
|
||||
|
||||
extension on Builder {
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isAugmentation {
|
||||
Builder self = this;
|
||||
if (self is SourceLibraryBuilder) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
return self.isAugmentationLibrary;
|
||||
} else if (self is SourceClassBuilder) {
|
||||
return self.isAugmentation;
|
||||
@@ -1602,6 +1609,7 @@ extension on Builder {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void set isConflictingAugmentationMember(bool value) {
|
||||
Builder self = this;
|
||||
if (self is SourceMemberBuilder) {
|
||||
@@ -1612,6 +1620,7 @@ extension on Builder {
|
||||
// TODO(johnniwinther): Handle all cases here.
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool _hasPatchAnnotation(Iterable<MetadataBuilder>? metadata) {
|
||||
if (metadata == null) {
|
||||
return false;
|
||||
@@ -1624,6 +1633,7 @@ extension on Builder {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get hasPatchAnnotation {
|
||||
Builder self = this;
|
||||
if (self is SourceFunctionBuilder) {
|
||||
@@ -1636,9 +1646,7 @@ extension on Builder {
|
||||
return _hasPatchAnnotation(self.metadata);
|
||||
} else if (self is SourceMethodBuilder) {
|
||||
return _hasPatchAnnotation(self.metadata);
|
||||
}
|
||||
// Coverage-ignore(suite): Not run.
|
||||
else if (self is SourceExtensionTypeDeclarationBuilder) {
|
||||
} else if (self is SourceExtensionTypeDeclarationBuilder) {
|
||||
return _hasPatchAnnotation(self.metadata);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -248,6 +248,10 @@ abstract class Builder {
|
||||
|
||||
bool get isTypeParameter;
|
||||
|
||||
/// Adds [augmentation] to this declaration.
|
||||
// TODO(johnniwinther): Remove this augmentations are based on fragments.
|
||||
void addAugmentation(Builder augmentation);
|
||||
|
||||
/// Applies [augmentation] to this declaration.
|
||||
void applyAugmentation(Builder augmentation);
|
||||
|
||||
@@ -354,6 +358,12 @@ abstract class BuilderImpl implements Builder {
|
||||
@override
|
||||
bool get isTypeParameter => false;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void addAugmentation(Builder augmentation) {
|
||||
unsupported("${runtimeType}.addAugmentation", fileOffset, fileUri);
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
|
||||
@@ -207,6 +207,7 @@ abstract class ClassBuilderImpl extends DeclarationBuilderImpl
|
||||
forStaticAccess: true);
|
||||
}
|
||||
if (declaration == null && isAugmenting) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
return origin.findStaticBuilder(
|
||||
name, fileOffset, fileUri, accessingLibrary,
|
||||
isSetter: isSetter);
|
||||
|
||||
@@ -73,6 +73,7 @@ abstract class DeclarationBuilderImpl extends TypeDeclarationBuilderImpl
|
||||
MemberBuilder? declaration =
|
||||
nameSpace.lookupConstructor(name == 'new' ? '' : name);
|
||||
if (declaration == null && isAugmenting) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
return origin.findConstructorOrFactory(
|
||||
name, charOffset, uri, accessingLibrary);
|
||||
}
|
||||
|
||||
@@ -221,7 +221,8 @@ abstract class SourceCompilationUnit
|
||||
LibraryNameSpaceBuilder libraryNameSpaceBuilder,
|
||||
SourceCompilationUnit parentCompilationUnit,
|
||||
List<SourceCompilationUnit> includedParts,
|
||||
Set<Uri> usedParts);
|
||||
Set<Uri> usedParts,
|
||||
{required bool allowPartInParts});
|
||||
|
||||
void buildOutlineExpressions(
|
||||
Annotatable annotatable, BodyBuilderContext bodyBuilderContext,
|
||||
@@ -234,6 +235,10 @@ abstract class SourceCompilationUnit
|
||||
Message reportFeatureNotEnabled(
|
||||
LibraryFeature feature, Uri fileUri, int charOffset, int length);
|
||||
|
||||
/// Registers that [augmentation] is a part of the library for which this is
|
||||
/// the main compilation unit.
|
||||
void registerAugmentation(CompilationUnit augmentation);
|
||||
|
||||
/// Reports [message] on all compilation units that access this compilation
|
||||
/// unit.
|
||||
void addProblemAtAccessors(Message message);
|
||||
|
||||
@@ -88,10 +88,6 @@ class SynthesizedTypeBuilder extends FixedTypeBuilder {
|
||||
DartType type = _typeBuilder.buildAliased(library, typeUse, hierarchy);
|
||||
Substitution substitution =
|
||||
_computeSubstitution(library, typeUse, hierarchy);
|
||||
if ('$type'.contains('T*')) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
_typeBuilder.buildAliased(library, typeUse, hierarchy);
|
||||
}
|
||||
return substitution.substituteType(type);
|
||||
}
|
||||
|
||||
|
||||
@@ -257,6 +257,16 @@ class NominalParameterBuilder extends TypeParameterBuilder {
|
||||
/// The [TypeParameter] built by this builder.
|
||||
TypeParameter get parameter => origin.actualParameter;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void addAugmentation(covariant NominalParameterBuilder augmentation) {
|
||||
assert(
|
||||
_hasHashCode == null,
|
||||
"Cannot apply augmentation since to $this since hashCode has already "
|
||||
"been computed from $actualParameter @\n$_hasHashCode");
|
||||
augmentation.actualOrigin = this;
|
||||
}
|
||||
|
||||
@override
|
||||
void applyAugmentation(covariant NominalParameterBuilder augmentation) {
|
||||
assert(
|
||||
@@ -723,6 +733,12 @@ class StructuralParameterBuilder extends TypeParameterBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void addAugmentation(covariant StructuralParameterBuilder augmentation) {
|
||||
augmentation.actualOrigin = this;
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(covariant StructuralParameterBuilder augmentation) {
|
||||
|
||||
@@ -48,7 +48,6 @@ class ClassFragment extends DeclarationFragmentImpl implements Fragment {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isPatch => enclosingCompilationUnit.isPatch && modifiers.isAugment;
|
||||
|
||||
@override
|
||||
|
||||
@@ -33,6 +33,7 @@ class RegularClassDeclaration implements ClassDeclaration {
|
||||
RegularClassDeclaration(this._fragment);
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
List<MetadataBuilder>? get metadata => _fragment.metadata;
|
||||
|
||||
@override
|
||||
|
||||
@@ -272,6 +272,7 @@ class RegularConstructorDeclaration
|
||||
LookupScope get typeParameterScope => _fragment.typeParameterScope;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
List<MetadataBuilder>? get metadata => _fragment.metadata;
|
||||
|
||||
@override
|
||||
|
||||
@@ -50,8 +50,10 @@ class EnumFragment extends DeclarationFragmentImpl implements Fragment {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isPatch => enclosingCompilationUnit.isPatch && modifiers.isAugment;
|
||||
bool get isPatch =>
|
||||
enclosingCompilationUnit.isPatch &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
modifiers.isAugment;
|
||||
|
||||
@override
|
||||
void addEnumElement(EnumElementFragment fragment) {
|
||||
|
||||
@@ -47,7 +47,6 @@ class ExtensionFragment extends DeclarationFragmentImpl implements Fragment {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isPatch => enclosingCompilationUnit.isPatch && modifiers.isAugment;
|
||||
|
||||
@override
|
||||
|
||||
@@ -48,8 +48,10 @@ class ExtensionTypeFragment extends DeclarationFragmentImpl
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isPatch => enclosingCompilationUnit.isPatch && modifiers.isAugment;
|
||||
bool get isPatch =>
|
||||
enclosingCompilationUnit.isPatch &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
modifiers.isAugment;
|
||||
|
||||
@override
|
||||
void addPrimaryConstructorField(FieldFragment fragment) {
|
||||
|
||||
@@ -119,4 +119,7 @@ abstract interface class LibraryFragment {
|
||||
abstract interface class DeclarationFragment {
|
||||
/// Returns `true` if this is a patch declaration.
|
||||
bool get isPatch;
|
||||
|
||||
/// Type parameters declared on this declaration.
|
||||
List<TypeParameterFragment>? get typeParameters;
|
||||
}
|
||||
|
||||
@@ -935,6 +935,7 @@ class _GetterFragmentBodyBuilderContext extends BodyBuilderContext {
|
||||
VariableDeclaration? getTearOffParameter(int index) => null;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? get augmentSuperTarget {
|
||||
if (_fragment.builder.isAugmentation) {
|
||||
return _fragment.builder.augmentSuperTarget;
|
||||
|
||||
@@ -289,8 +289,13 @@ class _ExtensionInstanceMethodStrategy implements MethodEncodingStrategy {
|
||||
ExtensionBuilder declarationBuilder =
|
||||
builder.declarationBuilder as ExtensionBuilder;
|
||||
SynthesizedExtensionSignature signature = new SynthesizedExtensionSignature(
|
||||
declarationBuilder, unboundNominalParameters,
|
||||
fileUri: fragment.fileUri, fileOffset: fragment.nameOffset);
|
||||
declarationBuilder: declarationBuilder,
|
||||
extensionTypeParameterFragments:
|
||||
fragment.enclosingDeclaration!.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
onTypeBuilder: declarationBuilder.onType,
|
||||
fileUri: fragment.fileUri,
|
||||
fileOffset: fragment.nameOffset);
|
||||
return fragment.isOperator
|
||||
? new _ExtensionInstanceOperatorEncoding(fragment,
|
||||
signature.clonedDeclarationTypeParameters, signature.thisFormal)
|
||||
@@ -323,8 +328,12 @@ class _ExtensionTypeInstanceMethodStrategy implements MethodEncodingStrategy {
|
||||
builder.declarationBuilder as ExtensionTypeDeclarationBuilder;
|
||||
SynthesizedExtensionTypeSignature signature =
|
||||
new SynthesizedExtensionTypeSignature(
|
||||
declarationBuilder, unboundNominalParameters,
|
||||
fileUri: fragment.fileUri, fileOffset: fragment.nameOffset);
|
||||
extensionTypeDeclarationBuilder: declarationBuilder,
|
||||
extensionTypeTypeParameters:
|
||||
fragment.enclosingDeclaration!.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
fileUri: fragment.fileUri,
|
||||
fileOffset: fragment.nameOffset);
|
||||
return fragment.isOperator
|
||||
? new _ExtensionTypeInstanceOperatorEncoding(fragment,
|
||||
signature.clonedDeclarationTypeParameters, signature.thisFormal)
|
||||
@@ -1314,6 +1323,7 @@ class _MethodFragmentBodyBuilderContext extends BodyBuilderContext {
|
||||
_fragment._encoding.getTearOffParameter(index);
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? get augmentSuperTarget {
|
||||
if (_fragment.builder.isAugmentation) {
|
||||
return _fragment.builder.augmentSuperTarget;
|
||||
|
||||
@@ -48,8 +48,10 @@ class MixinFragment extends DeclarationFragmentImpl implements Fragment {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isPatch => enclosingCompilationUnit.isPatch && modifiers.isAugment;
|
||||
bool get isPatch =>
|
||||
enclosingCompilationUnit.isPatch &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
modifiers.isAugment;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
|
||||
@@ -956,6 +956,7 @@ class _SetterFragmentBodyBuilderContext extends BodyBuilderContext {
|
||||
VariableDeclaration? getTearOffParameter(int index) => null;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? get augmentSuperTarget {
|
||||
if (_fragment.builder.isAugmentation) {
|
||||
return _fragment.builder.augmentSuperTarget;
|
||||
|
||||
@@ -364,8 +364,13 @@ class ExtensionInstancePropertyEncodingStrategy
|
||||
ExtensionBuilder declarationBuilder =
|
||||
builder.declarationBuilder as ExtensionBuilder;
|
||||
SynthesizedExtensionSignature signature = new SynthesizedExtensionSignature(
|
||||
declarationBuilder, unboundNominalParameters,
|
||||
fileUri: fragment.fileUri, fileOffset: fragment.nameOffset);
|
||||
declarationBuilder: declarationBuilder,
|
||||
extensionTypeParameterFragments:
|
||||
fragment.enclosingDeclaration!.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
onTypeBuilder: declarationBuilder.onType,
|
||||
fileUri: fragment.fileUri,
|
||||
fileOffset: fragment.nameOffset);
|
||||
return new _ExtensionInstanceGetterEncoding(fragment,
|
||||
signature.clonedDeclarationTypeParameters, signature.thisFormal);
|
||||
}
|
||||
@@ -378,8 +383,13 @@ class ExtensionInstancePropertyEncodingStrategy
|
||||
ExtensionBuilder declarationBuilder =
|
||||
builder.declarationBuilder as ExtensionBuilder;
|
||||
SynthesizedExtensionSignature signature = new SynthesizedExtensionSignature(
|
||||
declarationBuilder, unboundNominalParameters,
|
||||
fileUri: fragment.fileUri, fileOffset: fragment.nameOffset);
|
||||
declarationBuilder: declarationBuilder,
|
||||
extensionTypeParameterFragments:
|
||||
fragment.enclosingDeclaration!.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
onTypeBuilder: declarationBuilder.onType,
|
||||
fileUri: fragment.fileUri,
|
||||
fileOffset: fragment.nameOffset);
|
||||
return new _ExtensionInstanceSetterEncoding(fragment,
|
||||
signature.clonedDeclarationTypeParameters, signature.thisFormal);
|
||||
}
|
||||
@@ -419,8 +429,12 @@ class ExtensionTypeInstancePropertyEncodingStrategy
|
||||
builder.declarationBuilder as ExtensionTypeDeclarationBuilder;
|
||||
SynthesizedExtensionTypeSignature signature =
|
||||
new SynthesizedExtensionTypeSignature(
|
||||
declarationBuilder, unboundNominalParameters,
|
||||
fileUri: fragment.fileUri, fileOffset: fragment.nameOffset);
|
||||
extensionTypeDeclarationBuilder: declarationBuilder,
|
||||
extensionTypeTypeParameters:
|
||||
fragment.enclosingDeclaration!.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
fileUri: fragment.fileUri,
|
||||
fileOffset: fragment.nameOffset);
|
||||
return new _ExtensionTypeInstanceGetterEncoding(fragment,
|
||||
signature.clonedDeclarationTypeParameters, signature.thisFormal);
|
||||
}
|
||||
@@ -434,8 +448,12 @@ class ExtensionTypeInstancePropertyEncodingStrategy
|
||||
builder.declarationBuilder as ExtensionTypeDeclarationBuilder;
|
||||
SynthesizedExtensionTypeSignature signature =
|
||||
new SynthesizedExtensionTypeSignature(
|
||||
declarationBuilder, unboundNominalParameters,
|
||||
fileUri: fragment.fileUri, fileOffset: fragment.nameOffset);
|
||||
extensionTypeDeclarationBuilder: declarationBuilder,
|
||||
extensionTypeTypeParameters:
|
||||
fragment.enclosingDeclaration!.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
fileUri: fragment.fileUri,
|
||||
fileOffset: fragment.nameOffset);
|
||||
return new _ExtensionTypeInstanceSetterEncoding(fragment,
|
||||
signature.clonedDeclarationTypeParameters, signature.thisFormal);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:kernel/ast.dart';
|
||||
const String _augmentedNamePrefix = '_#';
|
||||
const String _augmentedNameSuffix = '#augment';
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
/// Creates the synthesized name to use for the [index]th augmented
|
||||
/// member by the given [name] in [library].
|
||||
///
|
||||
|
||||
@@ -3195,6 +3195,7 @@ class BodyBuilder extends StackListenerImpl
|
||||
bool isQualified = prefixToken != null;
|
||||
Builder? declaration = scope.lookupGetable(name, nameOffset, uri);
|
||||
if (declaration == null && prefix == null && _context.isAugmentationClass) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
// The scope of an augmented method includes the origin class.
|
||||
declaration = _context.lookupStaticOriginMember(name, nameOffset, uri);
|
||||
}
|
||||
@@ -7228,6 +7229,7 @@ class BodyBuilder extends StackListenerImpl
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void handleAugmentSuperExpression(
|
||||
Token augmentToken, Token superToken, IdentifierContext context) {
|
||||
debugEvent("AugmentSuperExpression");
|
||||
|
||||
@@ -123,6 +123,7 @@ abstract class BodyBuilderContext {
|
||||
/// Returns `true` if the enclosing entity is an extension.
|
||||
bool get isExtensionDeclaration => _declarationContext.isExtensionDeclaration;
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
/// Looks up the static member by the given [name] in the origin of the
|
||||
/// enclosing declaration.
|
||||
Builder? lookupStaticOriginMember(String name, int fileOffset, Uri fileUri) {
|
||||
@@ -543,6 +544,7 @@ class _SourceClassBodyBuilderDeclarationContext
|
||||
bool get isAugmentationClass => _sourceClassBuilder.isAugmenting;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
Builder? lookupStaticOriginMember(String name, int fileOffset, Uri fileUri) {
|
||||
// The scope of an augmented method includes the origin class.
|
||||
return _sourceClassBuilder.origin
|
||||
|
||||
@@ -5058,6 +5058,7 @@ class PropertySelector extends Selector {
|
||||
}
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
class AugmentSuperAccessGenerator extends Generator {
|
||||
final AugmentSuperTarget augmentSuperTarget;
|
||||
|
||||
@@ -5066,11 +5067,9 @@ class AugmentSuperAccessGenerator extends Generator {
|
||||
: super(helper, token);
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
String get _debugName => "AugmentSuperGenerator";
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
String get _plainNameForRead {
|
||||
return unsupported("augment super.plainNameForRead", fileOffset, _uri);
|
||||
}
|
||||
@@ -5152,7 +5151,6 @@ class AugmentSuperAccessGenerator extends Generator {
|
||||
return buildCompoundAssignment(binaryOperator, value,
|
||||
offset: offset, voidContext: voidContext, isPostIncDec: true);
|
||||
}
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
VariableDeclarationImpl read =
|
||||
_helper.createVariableDeclarationForValue(_createRead());
|
||||
Expression binary = _helper.forest.createBinary(offset,
|
||||
@@ -5182,7 +5180,6 @@ class AugmentSuperAccessGenerator extends Generator {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void printOn(StringSink sink) {
|
||||
sink.write(", augmentSuperTarget: ");
|
||||
sink.write(augmentSuperTarget);
|
||||
|
||||
@@ -815,9 +815,9 @@ class IntJudgment extends IntLiteral implements ExpressionJudgment {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void toTextInternal(AstPrinter printer) {
|
||||
if (literal == null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
printer.write('$value');
|
||||
} else {
|
||||
printer.write(literal!);
|
||||
@@ -2967,6 +2967,7 @@ class PropertySet extends InternalExpression {
|
||||
}
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
/// An augment super invocation of the form `augment super()`.
|
||||
///
|
||||
/// This will be transformed into an [InstanceInvocation], [InstanceGet] plus
|
||||
@@ -2994,17 +2995,16 @@ class AugmentSuperInvocation extends InternalExpression {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
int get precedence => Precedence.PRIMARY;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void toTextInternal(AstPrinter printer) {
|
||||
printer.write('augment super');
|
||||
printer.writeArguments(arguments);
|
||||
}
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
/// An augment super read of the form `augment super`.
|
||||
///
|
||||
/// This will be transformed into an [InstanceGet], [InstanceTearOff],
|
||||
@@ -3029,16 +3029,15 @@ class AugmentSuperGet extends InternalExpression {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
int get precedence => Precedence.PRIMARY;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void toTextInternal(AstPrinter printer) {
|
||||
printer.write('augment super');
|
||||
}
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
/// An augment super write of the form `augment super = e`.
|
||||
///
|
||||
/// This will be transformed into an [InstanceSet], or [StaticSet] after type
|
||||
@@ -3069,7 +3068,6 @@ class AugmentSuperSet extends InternalExpression {
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void toTextInternal(AstPrinter printer) {
|
||||
printer.write('augment super = ');
|
||||
printer.writeExpression(value);
|
||||
|
||||
@@ -1717,12 +1717,12 @@ class KernelTarget {
|
||||
List<Uri>? patches = uriTranslator.getDartPatches(originImportUri.path);
|
||||
if (patches != null) {
|
||||
for (Uri patch in patches) {
|
||||
loader.read(patch, -1,
|
||||
compilationUnit.registerAugmentation(loader.read(patch, -1,
|
||||
fileUri: patch,
|
||||
originImportUri: originImportUri,
|
||||
origin: compilationUnit,
|
||||
accessor: compilationUnit,
|
||||
isPatch: true);
|
||||
isPatch: true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,10 +503,17 @@ class NominalParameterCopy {
|
||||
/// methods and unnamed mixin applications, and for adding copies of
|
||||
/// extension type parameters to extension instance methods.
|
||||
static NominalParameterCopy? copyTypeParameters(
|
||||
List<NominalParameterBuilder> unboundNominalParameters,
|
||||
List<NominalParameterBuilder>? oldParameterBuilders,
|
||||
{required TypeParameterKind kind,
|
||||
{required List<NominalParameterBuilder> unboundNominalParameters,
|
||||
required List<NominalParameterBuilder>? oldParameterBuilders,
|
||||
List<TypeParameterFragment>? oldParameterFragments,
|
||||
required TypeParameterKind kind,
|
||||
required InstanceTypeParameterAccessState instanceTypeParameterAccess}) {
|
||||
assert(
|
||||
oldParameterFragments == null ||
|
||||
oldParameterBuilders?.length == oldParameterFragments.length,
|
||||
"Invalid type parameter fragment count. "
|
||||
"Expected ${oldParameterBuilders?.length}, "
|
||||
"found ${oldParameterFragments.length}.");
|
||||
if (oldParameterBuilders == null || oldParameterBuilders.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
@@ -519,16 +526,20 @@ class NominalParameterCopy {
|
||||
|
||||
List<NominalParameterBuilder> newVariableBuilders =
|
||||
<NominalParameterBuilder>[];
|
||||
for (NominalParameterBuilder oldVariable in oldParameterBuilders) {
|
||||
NominalParameterBuilder newVariable = new NominalParameterBuilder(
|
||||
oldVariable.name, oldVariable.fileOffset, oldVariable.fileUri,
|
||||
kind: kind,
|
||||
variableVariance: oldVariable.parameter.isLegacyCovariant
|
||||
? null
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
oldVariable.variance,
|
||||
isWildcard: oldVariable.isWildcard);
|
||||
for (int index = 0; index < oldParameterBuilders.length; index++) {
|
||||
NominalParameterBuilder oldVariable = oldParameterBuilders[index];
|
||||
TypeParameterFragment? oldFragment = oldParameterFragments?[index];
|
||||
Uri? fileUri = oldFragment?.fileUri ?? oldVariable.fileUri;
|
||||
int fileOffset = oldFragment?.nameOffset ?? oldVariable.fileOffset;
|
||||
NominalParameterBuilder newVariable =
|
||||
new NominalParameterBuilder(oldVariable.name, fileOffset, fileUri,
|
||||
kind: kind,
|
||||
variableVariance: oldVariable.parameter.isLegacyCovariant
|
||||
? null
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
oldVariable.variance,
|
||||
isWildcard: oldVariable.isWildcard);
|
||||
newVariableBuilders.add(newVariable);
|
||||
newToOldVariableMap[newVariable] = oldVariable;
|
||||
unboundNominalParameters.add(newVariable);
|
||||
@@ -568,21 +579,27 @@ class SynthesizedExtensionSignature {
|
||||
SynthesizedExtensionSignature._(
|
||||
this.clonedDeclarationTypeParameters, this.thisFormal);
|
||||
|
||||
factory SynthesizedExtensionSignature(ExtensionBuilder declarationBuilder,
|
||||
List<NominalParameterBuilder> unboundNominalParameters,
|
||||
{required Uri fileUri, required int fileOffset}) {
|
||||
factory SynthesizedExtensionSignature(
|
||||
{required ExtensionBuilder declarationBuilder,
|
||||
required List<TypeParameterFragment>? extensionTypeParameterFragments,
|
||||
required TypeBuilder onTypeBuilder,
|
||||
required List<NominalParameterBuilder> unboundNominalParameters,
|
||||
required Uri fileUri,
|
||||
required int fileOffset}) {
|
||||
List<NominalParameterBuilder>? clonedDeclarationTypeParameters;
|
||||
|
||||
NominalParameterCopy? nominalVariableCopy =
|
||||
NominalParameterCopy.copyTypeParameters(
|
||||
unboundNominalParameters, declarationBuilder.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
oldParameterBuilders: declarationBuilder.typeParameters,
|
||||
oldParameterFragments: extensionTypeParameterFragments,
|
||||
kind: TypeParameterKind.extensionSynthesized,
|
||||
instanceTypeParameterAccess:
|
||||
InstanceTypeParameterAccessState.Allowed);
|
||||
|
||||
clonedDeclarationTypeParameters = nominalVariableCopy?.newParameterBuilders;
|
||||
|
||||
TypeBuilder thisType = declarationBuilder.onType;
|
||||
TypeBuilder thisType = onTypeBuilder;
|
||||
if (nominalVariableCopy != null) {
|
||||
thisType = nominalVariableCopy.createInContext(thisType);
|
||||
}
|
||||
@@ -611,15 +628,19 @@ class SynthesizedExtensionTypeSignature {
|
||||
this.clonedDeclarationTypeParameters, this.thisFormal);
|
||||
|
||||
factory SynthesizedExtensionTypeSignature(
|
||||
ExtensionTypeDeclarationBuilder declarationBuilder,
|
||||
List<NominalParameterBuilder> unboundNominalParameters,
|
||||
{required Uri fileUri,
|
||||
{required ExtensionTypeDeclarationBuilder extensionTypeDeclarationBuilder,
|
||||
required List<TypeParameterFragment>? extensionTypeTypeParameters,
|
||||
required List<NominalParameterBuilder> unboundNominalParameters,
|
||||
required Uri fileUri,
|
||||
required int fileOffset}) {
|
||||
List<NominalParameterBuilder>? clonedDeclarationTypeParameters;
|
||||
|
||||
NominalParameterCopy? nominalVariableCopy =
|
||||
NominalParameterCopy.copyTypeParameters(
|
||||
unboundNominalParameters, declarationBuilder.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
oldParameterBuilders:
|
||||
extensionTypeDeclarationBuilder.typeParameters,
|
||||
oldParameterFragments: extensionTypeTypeParameters,
|
||||
kind: TypeParameterKind.extensionSynthesized,
|
||||
instanceTypeParameterAccess:
|
||||
InstanceTypeParameterAccessState.Allowed);
|
||||
@@ -627,10 +648,10 @@ class SynthesizedExtensionTypeSignature {
|
||||
clonedDeclarationTypeParameters = nominalVariableCopy?.newParameterBuilders;
|
||||
|
||||
TypeBuilder thisType = new NamedTypeBuilderImpl.fromTypeDeclarationBuilder(
|
||||
declarationBuilder, const NullabilityBuilder.omitted(),
|
||||
arguments: declarationBuilder.typeParameters != null
|
||||
extensionTypeDeclarationBuilder, const NullabilityBuilder.omitted(),
|
||||
arguments: extensionTypeTypeParameters != null
|
||||
? new List<TypeBuilder>.generate(
|
||||
declarationBuilder.typeParameters!.length,
|
||||
extensionTypeTypeParameters.length,
|
||||
(int index) =>
|
||||
new NamedTypeBuilderImpl.fromTypeDeclarationBuilder(
|
||||
clonedDeclarationTypeParameters![index],
|
||||
|
||||
@@ -84,31 +84,47 @@ abstract class ClassDeclarationBuilder
|
||||
}
|
||||
|
||||
mixin ClassDeclarationBuilderMixin implements ClassDeclarationBuilder {
|
||||
List<ConstructorReferenceBuilder>? get constructorReferences;
|
||||
List<ConstructorReferenceBuilder> get constructorReferences;
|
||||
|
||||
List<ClassDeclarationBuilderMixin>? get augmentations;
|
||||
|
||||
LookupScope get bodyScope;
|
||||
|
||||
@override
|
||||
int resolveConstructors(SourceLibraryBuilder library) {
|
||||
if (constructorReferences == null) return 0;
|
||||
for (ConstructorReferenceBuilder ref in constructorReferences!) {
|
||||
ref.resolveIn(bodyScope, library);
|
||||
}
|
||||
int count = constructorReferences!.length;
|
||||
if (count != 0) {
|
||||
Iterator<MemberBuilder> iterator = nameSpace.filteredConstructorIterator(
|
||||
parent: this, includeDuplicates: true, includeAugmentations: true);
|
||||
while (iterator.moveNext()) {
|
||||
MemberBuilder declaration = iterator.current;
|
||||
if (declaration.declarationBuilder?.origin != origin) {
|
||||
unexpected("$fileUri", "${declaration.declarationBuilder!.fileUri}",
|
||||
fileOffset, fileUri);
|
||||
}
|
||||
if (declaration is SourceFactoryBuilder) {
|
||||
declaration.resolveRedirectingFactory();
|
||||
}
|
||||
int resolveConstructorReferences(SourceLibraryBuilder library) {
|
||||
int count = 0;
|
||||
if (constructorReferences.isNotEmpty) {
|
||||
for (ConstructorReferenceBuilder ref in constructorReferences) {
|
||||
ref.resolveIn(bodyScope, library);
|
||||
}
|
||||
}
|
||||
List<ClassDeclarationBuilderMixin>? augmentations = this.augmentations;
|
||||
if (augmentations != null) {
|
||||
for (ClassDeclarationBuilderMixin augmentation in augmentations) {
|
||||
count += augmentation.resolveConstructorReferences(library);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
void resolveConstructorRedirections() {
|
||||
Iterator<MemberBuilder> iterator = nameSpace.filteredConstructorIterator(
|
||||
parent: null, includeDuplicates: true, includeAugmentations: false);
|
||||
while (iterator.moveNext()) {
|
||||
MemberBuilder declaration = iterator.current;
|
||||
if (declaration.declarationBuilder?.origin != origin) {
|
||||
unexpected("$fileUri", "${declaration.declarationBuilder!.fileUri}",
|
||||
fileOffset, fileUri);
|
||||
}
|
||||
if (declaration is SourceFactoryBuilder) {
|
||||
declaration.resolveRedirectingFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int resolveConstructors(SourceLibraryBuilder library) {
|
||||
int count = resolveConstructorReferences(library);
|
||||
resolveConstructorRedirections();
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,7 +579,10 @@ class DietListener extends StackListenerImpl {
|
||||
|
||||
// Native imports must be skipped because they aren't assigned corresponding
|
||||
// LibraryDependency nodes.
|
||||
Token importUriToken = augmentToken?.next ?? importKeyword.next!;
|
||||
Token importUriToken = augmentToken
|
||||
// Coverage-ignore(suite): Not run.
|
||||
?.next ??
|
||||
importKeyword.next!;
|
||||
String importUri =
|
||||
unescapeString(importUriToken.lexeme, importUriToken, this);
|
||||
if (importUri.startsWith("dart-ext:")) return;
|
||||
|
||||
@@ -718,6 +718,7 @@ class OutlineBuilder extends StackListenerImpl {
|
||||
}
|
||||
|
||||
if (augmentToken != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (reportIfNotEnabled(libraryFeatures.macros, augmentToken.charOffset,
|
||||
augmentToken.length)) {
|
||||
augmentToken = null;
|
||||
|
||||
@@ -660,7 +660,10 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
isPatch: _compilationUnit.isAugmenting,
|
||||
referencesFromIndex: indexedLibrary,
|
||||
referenceIsPartOwner: indexedLibrary != null);
|
||||
_parts.add(new Part(charOffset, compilationUnit));
|
||||
_parts.add(new Part(
|
||||
fileUri: _compilationUnit.fileUri,
|
||||
fileOffset: charOffset,
|
||||
compilationUnit: compilationUnit));
|
||||
|
||||
// TODO(ahe): [metadata] should be stored, evaluated, and added to [part].
|
||||
LibraryPart part = new LibraryPart(<Expression>[], uri)
|
||||
@@ -743,10 +746,18 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
} else {
|
||||
resolvedUri = _resolve(_compilationUnit.importUri, uri, uriOffset);
|
||||
compilationUnit = loader.read(resolvedUri, uriOffset,
|
||||
origin: isAugmentationImport ? _augmentationRoot : null,
|
||||
origin: isAugmentationImport
|
||||
?
|
||||
// Coverage-ignore(suite): Not run.
|
||||
_augmentationRoot
|
||||
: null,
|
||||
accessor: _compilationUnit,
|
||||
isAugmentation: isAugmentationImport,
|
||||
referencesFromIndex: isAugmentationImport ? indexedLibrary : null);
|
||||
referencesFromIndex: isAugmentationImport
|
||||
?
|
||||
// Coverage-ignore(suite): Not run.
|
||||
indexedLibrary
|
||||
: null);
|
||||
}
|
||||
|
||||
Import import = new Import(
|
||||
@@ -827,6 +838,11 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
modifiers |= Modifiers.DeclaresConstConstructor;
|
||||
}
|
||||
|
||||
bool isPatch =
|
||||
_compilationUnit.forPatchLibrary && _hasPatchAnnotation(metadata);
|
||||
if (isPatch) {
|
||||
modifiers |= Modifiers.Augment;
|
||||
}
|
||||
declarationFragment.metadata = metadata;
|
||||
declarationFragment.modifiers = modifiers;
|
||||
declarationFragment.supertype = supertype;
|
||||
@@ -1026,6 +1042,12 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
_problemReporting, typeParameters?.builders,
|
||||
ownerName: name, allowNameConflict: false);
|
||||
|
||||
bool isPatch =
|
||||
_compilationUnit.forPatchLibrary && _hasPatchAnnotation(metadata);
|
||||
if (isPatch) {
|
||||
modifiers |= Modifiers.Augment;
|
||||
}
|
||||
|
||||
declarationFragment.metadata = metadata;
|
||||
declarationFragment.modifiers = modifiers;
|
||||
declarationFragment.onType = onType;
|
||||
@@ -1352,6 +1374,11 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
NominalParameterNameSpace typeParameterNameSpace =
|
||||
_nominalParameterNameSpaces.pop();
|
||||
|
||||
bool isPatch =
|
||||
_compilationUnit.forPatchLibrary && _hasPatchAnnotation(metadata);
|
||||
if (isPatch) {
|
||||
modifiers |= Modifiers.Augment;
|
||||
}
|
||||
ConstructorFragment fragment = new ConstructorFragment(
|
||||
constructorName: constructorName,
|
||||
fileUri: _compilationUnit.fileUri,
|
||||
@@ -1434,6 +1461,11 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
NominalParameterNameSpace typeParameterNameSpace =
|
||||
_nominalParameterNameSpaces.pop();
|
||||
|
||||
bool isPatch =
|
||||
_compilationUnit.forPatchLibrary && _hasPatchAnnotation(metadata);
|
||||
if (isPatch) {
|
||||
modifiers |= Modifiers.Augment;
|
||||
}
|
||||
FactoryFragment fragment = new FactoryFragment(
|
||||
constructorName: constructorName,
|
||||
fileUri: _compilationUnit.fileUri,
|
||||
@@ -1646,6 +1678,11 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
NominalParameterNameSpace typeParameterNameSpace =
|
||||
_nominalParameterNameSpaces.pop();
|
||||
|
||||
bool isPatch =
|
||||
_compilationUnit.forPatchLibrary && _hasPatchAnnotation(metadata);
|
||||
if (isPatch) {
|
||||
modifiers |= Modifiers.Augment;
|
||||
}
|
||||
GetterFragment fragment = new GetterFragment(
|
||||
name: name,
|
||||
fileUri: _compilationUnit.fileUri,
|
||||
@@ -1713,6 +1750,11 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
NominalParameterNameSpace typeParameterNameSpace =
|
||||
_nominalParameterNameSpaces.pop();
|
||||
|
||||
bool isPatch =
|
||||
_compilationUnit.forPatchLibrary && _hasPatchAnnotation(metadata);
|
||||
if (isPatch) {
|
||||
modifiers |= Modifiers.Augment;
|
||||
}
|
||||
SetterFragment fragment = new SetterFragment(
|
||||
name: name,
|
||||
fileUri: _compilationUnit.fileUri,
|
||||
@@ -1783,6 +1825,11 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
NominalParameterNameSpace typeParameterNameSpace =
|
||||
_nominalParameterNameSpaces.pop();
|
||||
|
||||
bool isPatch =
|
||||
_compilationUnit.forPatchLibrary && _hasPatchAnnotation(metadata);
|
||||
if (isPatch) {
|
||||
modifiers |= Modifiers.Augment;
|
||||
}
|
||||
MethodFragment fragment = new MethodFragment(
|
||||
name: name,
|
||||
fileUri: _compilationUnit.fileUri,
|
||||
@@ -2163,3 +2210,15 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult {
|
||||
@override
|
||||
List<LibraryPart> get libraryParts => _libraryParts;
|
||||
}
|
||||
|
||||
bool _hasPatchAnnotation(Iterable<MetadataBuilder>? metadata) {
|
||||
if (metadata == null) {
|
||||
return false;
|
||||
}
|
||||
for (MetadataBuilder metadataBuilder in metadata) {
|
||||
if (metadataBuilder.hasPatch) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
List<TypeBuilder>? _interfaceBuilders;
|
||||
|
||||
@override
|
||||
final List<ConstructorReferenceBuilder>? constructorReferences;
|
||||
final List<ConstructorReferenceBuilder> constructorReferences;
|
||||
|
||||
TypeBuilder? _mixedInTypeBuilder;
|
||||
|
||||
@@ -139,6 +139,7 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
return _isConflictingAugmentationMember ??= false;
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void set isConflictingAugmentationMember(bool value) {
|
||||
assert(_isConflictingAugmentationMember == null,
|
||||
'$this.isConflictingAugmentationMember has already been fixed.');
|
||||
@@ -179,6 +180,11 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
actualCls.hasConstConstructor = declaresConstConstructor;
|
||||
}
|
||||
|
||||
// TODO(johnniwinther): Remove this when augmentations are handled through
|
||||
// fragments.
|
||||
@override
|
||||
List<SourceClassBuilder>? get augmentations => _augmentations;
|
||||
|
||||
// TODO(johnniwinther): Remove this when augmentations are handled through
|
||||
// fragments.
|
||||
@override
|
||||
@@ -233,10 +239,17 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
@override
|
||||
DeclarationNameSpace get nameSpace => _nameSpace;
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
List<MetadataBuilder>? get metadata => _introductory.metadata;
|
||||
|
||||
@override
|
||||
void buildScopes(LibraryBuilder coreLibrary) {
|
||||
List<SourceClassBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceClassBuilder augmentation in augmentations) {
|
||||
nameSpaceBuilder.includeBuilders(augmentation.nameSpaceBuilder);
|
||||
}
|
||||
}
|
||||
_nameSpace = nameSpaceBuilder.buildNameSpace(
|
||||
loader: libraryBuilder.loader,
|
||||
problemReporting: libraryBuilder,
|
||||
@@ -246,6 +259,12 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
indexedContainer: indexedClass,
|
||||
containerType: ContainerType.Class,
|
||||
containerName: new ClassName(name));
|
||||
if (augmentations != null) {
|
||||
for (SourceClassBuilder augmentation in augmentations) {
|
||||
augmentation.buildScopes(coreLibrary);
|
||||
_applyAugmentation(augmentation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MergedClassMemberScope get mergedScope => _mergedScope ??= isAugmenting
|
||||
@@ -374,8 +393,8 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
Class build(LibraryBuilder coreLibrary) {
|
||||
void buildBuilders(Builder declaration) {
|
||||
if (declaration.parent != this) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (declaration.parent?.origin != origin) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (fileUri != declaration.parent?.fileUri) {
|
||||
unexpected("$fileUri", "${declaration.parent?.fileUri}", fileOffset,
|
||||
fileUri);
|
||||
@@ -542,6 +561,14 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
.filteredIterator(
|
||||
parent: this, includeDuplicates: false, includeAugmentations: true)
|
||||
.forEach(build);
|
||||
|
||||
List<SourceClassBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceClassBuilder augmentation in augmentations) {
|
||||
augmentation.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -711,27 +738,15 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
}
|
||||
|
||||
@override
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
void addAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
SourceClassBuilder? _addAugmentation(Builder augmentation) {
|
||||
if (augmentation is SourceClassBuilder) {
|
||||
augmentation.actualOrigin = this;
|
||||
(_augmentations ??= []).add(augmentation);
|
||||
|
||||
mergedScope.addAugmentationScope(augmentation);
|
||||
|
||||
int originLength = typeParameters?.length ?? 0;
|
||||
int augmentationLength = augmentation.typeParameters?.length ?? 0;
|
||||
if (originLength != augmentationLength) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentation.addProblem(messagePatchClassTypeParametersMismatch,
|
||||
augmentation.fileOffset, noLength, context: [
|
||||
messagePatchClassOrigin.withLocation(fileUri, fileOffset, noLength)
|
||||
]);
|
||||
} else if (typeParameters != null) {
|
||||
int count = 0;
|
||||
for (NominalParameterBuilder t in augmentation.typeParameters!) {
|
||||
typeParameters![count++].applyAugmentation(t);
|
||||
}
|
||||
}
|
||||
return augmentation;
|
||||
} else {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
libraryBuilder.addProblem(messagePatchDeclarationMismatch,
|
||||
@@ -739,6 +754,35 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
messagePatchDeclarationOrigin.withLocation(
|
||||
fileUri, fileOffset, noLength)
|
||||
]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
SourceClassBuilder? classBuilder = _addAugmentation(augmentation);
|
||||
if (classBuilder != null) {
|
||||
_applyAugmentation(classBuilder);
|
||||
}
|
||||
}
|
||||
|
||||
void _applyAugmentation(SourceClassBuilder augmentation) {
|
||||
mergedScope.addAugmentationScope(augmentation);
|
||||
|
||||
int originLength = typeParameters?.length ?? 0;
|
||||
int augmentationLength = augmentation.typeParameters?.length ?? 0;
|
||||
if (originLength != augmentationLength) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentation.addProblem(messagePatchClassTypeParametersMismatch,
|
||||
augmentation.fileOffset, noLength, context: [
|
||||
messagePatchClassOrigin.withLocation(fileUri, fileOffset, noLength)
|
||||
]);
|
||||
} else if (typeParameters != null) {
|
||||
int count = 0;
|
||||
for (NominalParameterBuilder t in augmentation.typeParameters!) {
|
||||
typeParameters![count++].applyAugmentation(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1324,13 +1368,14 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
return;
|
||||
}
|
||||
if (builder is SourceMemberBuilder) {
|
||||
count += builder.buildBodyNodes((
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
count += builder.buildBodyNodes(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
_addMemberToClass(builder, member);
|
||||
if (tearOff != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
_addMemberToClass(builder, tearOff);
|
||||
}
|
||||
});
|
||||
@@ -1354,9 +1399,8 @@ class SourceClassBuilder extends ClassBuilderImpl
|
||||
!memberBuilder.isDuplicate &&
|
||||
!memberBuilder.isConflictingSetter) {
|
||||
if (memberBuilder.isConflictingAugmentationMember) {
|
||||
if (member is Field &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
member.isStatic ||
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (member is Field && member.isStatic ||
|
||||
member is Procedure && member.isStatic) {
|
||||
member.name = new Name(
|
||||
'${member.name}'
|
||||
@@ -2293,7 +2337,8 @@ TypeBuilder? _applyMixins(
|
||||
|
||||
NominalParameterCopy nominalVariableCopy =
|
||||
NominalParameterCopy.copyTypeParameters(
|
||||
unboundNominalParameters, typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
oldParameterBuilders: typeParameters,
|
||||
kind: TypeParameterKind.extensionSynthesized,
|
||||
instanceTypeParameterAccess:
|
||||
InstanceTypeParameterAccessState.Allowed)!;
|
||||
|
||||
@@ -263,7 +263,6 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
originImportUri.isScheme("dart") || fileUri.isScheme("org-dartlang-sdk");
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isPatch => forPatchLibrary;
|
||||
|
||||
/// Returns the map of objects created in the [OutlineBuilder].
|
||||
@@ -284,6 +283,13 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
return _libraryBuilder!;
|
||||
}
|
||||
|
||||
List<CompilationUnit>? _augmentations;
|
||||
|
||||
@override
|
||||
void registerAugmentation(CompilationUnit augmentation) {
|
||||
(_augmentations ??= []).add(augmentation);
|
||||
}
|
||||
|
||||
@override
|
||||
SourceCompilationUnit? get parentCompilationUnit => _parentCompilationUnit;
|
||||
|
||||
@@ -471,8 +477,8 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
"the compilation unit is finalized.");
|
||||
assert(_libraryBuilder == null,
|
||||
"Source library builder as already been created for $this.");
|
||||
SourceLibraryBuilder libraryBuilder = _libraryBuilder =
|
||||
new SourceLibraryBuilder(
|
||||
SourceLibraryBuilder libraryBuilder =
|
||||
_libraryBuilder = new SourceLibraryBuilder(
|
||||
compilationUnit: this,
|
||||
importUri: importUri,
|
||||
fileUri: fileUri,
|
||||
@@ -481,7 +487,9 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
packageLanguageVersion: packageLanguageVersion,
|
||||
loader: loader,
|
||||
nameOrigin: _nameOrigin,
|
||||
origin: _augmentationRoot?.libraryBuilder,
|
||||
origin: _augmentationRoot
|
||||
// Coverage-ignore(suite): Not run.
|
||||
?.libraryBuilder,
|
||||
target: library,
|
||||
indexedLibrary: indexedLibrary,
|
||||
referenceIsPartOwner: _referenceIsPartOwner,
|
||||
@@ -590,14 +598,17 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
void includeParts(
|
||||
List<SourceCompilationUnit> includedParts, Set<Uri> usedParts) {
|
||||
_includeParts(
|
||||
libraryBuilder, _libraryNameSpaceBuilder, includedParts, usedParts);
|
||||
libraryBuilder: libraryBuilder,
|
||||
libraryNameSpaceBuilder: _libraryNameSpaceBuilder,
|
||||
includedParts: includedParts,
|
||||
usedParts: usedParts);
|
||||
}
|
||||
|
||||
void _includeParts(
|
||||
SourceLibraryBuilder libraryBuilder,
|
||||
LibraryNameSpaceBuilder libraryNameSpaceBuilder,
|
||||
List<SourceCompilationUnit> includedParts,
|
||||
Set<Uri> usedParts) {
|
||||
{required SourceLibraryBuilder libraryBuilder,
|
||||
required LibraryNameSpaceBuilder libraryNameSpaceBuilder,
|
||||
required List<SourceCompilationUnit> includedParts,
|
||||
required Set<Uri> usedParts}) {
|
||||
Set<Uri> seenParts = new Set<Uri>();
|
||||
for (Part part in _builderFactoryResult.parts) {
|
||||
// TODO(johnniwinther): Use [part.offset] in messages.
|
||||
@@ -615,8 +626,15 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
]);
|
||||
} else {
|
||||
usedParts.add(part.compilationUnit.importUri);
|
||||
_includePart(libraryBuilder, libraryNameSpaceBuilder, this,
|
||||
includedParts, part.compilationUnit, usedParts, part.offset);
|
||||
_includePartIfValid(
|
||||
libraryBuilder: libraryBuilder,
|
||||
libraryNameSpaceBuilder: libraryNameSpaceBuilder,
|
||||
parentCompilationUnit: this,
|
||||
includedParts: includedParts,
|
||||
part: part.compilationUnit,
|
||||
usedParts: usedParts,
|
||||
partOffset: part.fileOffset,
|
||||
partUri: fileUri);
|
||||
}
|
||||
} else {
|
||||
addProblem(
|
||||
@@ -626,16 +644,33 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
fileUri);
|
||||
}
|
||||
}
|
||||
if (_augmentations != null) {
|
||||
for (CompilationUnit augmentation in _augmentations!) {
|
||||
switch (augmentation) {
|
||||
case SourceCompilationUnit():
|
||||
_includePart(libraryBuilder, libraryNameSpaceBuilder, this,
|
||||
includedParts, augmentation, usedParts,
|
||||
partOffset: -1,
|
||||
partUri: augmentation.fileUri,
|
||||
allowPartInParts: true);
|
||||
// Coverage-ignore(suite): Not run.
|
||||
case DillCompilationUnit():
|
||||
// TODO(johnniwinther): Report an error here.
|
||||
throw new UnsupportedError("Unexpected augmentation $augmentation");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _includePart(
|
||||
SourceLibraryBuilder libraryBuilder,
|
||||
LibraryNameSpaceBuilder libraryNameSpaceBuilder,
|
||||
SourceCompilationUnit parentCompilationUnit,
|
||||
List<SourceCompilationUnit> includedParts,
|
||||
CompilationUnit part,
|
||||
Set<Uri> usedParts,
|
||||
int partOffset) {
|
||||
void _includePartIfValid(
|
||||
{required SourceLibraryBuilder libraryBuilder,
|
||||
required LibraryNameSpaceBuilder libraryNameSpaceBuilder,
|
||||
required SourceCompilationUnit parentCompilationUnit,
|
||||
required List<SourceCompilationUnit> includedParts,
|
||||
required CompilationUnit part,
|
||||
required Set<Uri> usedParts,
|
||||
required Uri partUri,
|
||||
required int partOffset}) {
|
||||
switch (part) {
|
||||
case SourceCompilationUnit():
|
||||
if (part.partOfUri != null) {
|
||||
@@ -680,38 +715,12 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Language versions have to match. Except if (at least) one of them is
|
||||
// invalid in which case we've already gotten an error about this.
|
||||
if (parentCompilationUnit.languageVersion != part.languageVersion &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
parentCompilationUnit.languageVersion.valid &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
part.languageVersion.valid) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
// This is an error, but the part is not removed from the list of
|
||||
// parts, so that metadata annotations can be associated with it.
|
||||
List<LocatedMessage> context = <LocatedMessage>[];
|
||||
if (parentCompilationUnit.languageVersion.isExplicit) {
|
||||
context.add(messageLanguageVersionLibraryContext.withLocation(
|
||||
parentCompilationUnit.languageVersion.fileUri!,
|
||||
parentCompilationUnit.languageVersion.charOffset,
|
||||
parentCompilationUnit.languageVersion.charCount));
|
||||
}
|
||||
if (part.languageVersion.isExplicit) {
|
||||
context.add(messageLanguageVersionPartContext.withLocation(
|
||||
part.languageVersion.fileUri!,
|
||||
part.languageVersion.charOffset,
|
||||
part.languageVersion.charCount));
|
||||
}
|
||||
parentCompilationUnit.addProblem(messageLanguageVersionMismatchInPart,
|
||||
partOffset, noLength, parentCompilationUnit.fileUri,
|
||||
context: context);
|
||||
}
|
||||
|
||||
includedParts.add(part);
|
||||
part.becomePart(libraryBuilder, libraryNameSpaceBuilder,
|
||||
parentCompilationUnit, includedParts, usedParts);
|
||||
_includePart(libraryBuilder, libraryNameSpaceBuilder,
|
||||
parentCompilationUnit, includedParts, part, usedParts,
|
||||
partOffset: partOffset,
|
||||
partUri: partUri,
|
||||
allowPartInParts:
|
||||
parentCompilationUnit.libraryFeatures.enhancedParts.isEnabled);
|
||||
case DillCompilationUnit():
|
||||
// Trying to add a dill library builder as a part means that it exists
|
||||
// as a stand-alone library in the dill file.
|
||||
@@ -730,6 +739,67 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
}
|
||||
}
|
||||
|
||||
void _includePart(
|
||||
SourceLibraryBuilder libraryBuilder,
|
||||
LibraryNameSpaceBuilder libraryNameSpaceBuilder,
|
||||
SourceCompilationUnit parentCompilationUnit,
|
||||
List<SourceCompilationUnit> includedParts,
|
||||
SourceCompilationUnit part,
|
||||
Set<Uri> usedParts,
|
||||
{required int partOffset,
|
||||
required Uri partUri,
|
||||
required bool allowPartInParts}) {
|
||||
// Language versions have to match. Except if (at least) one of them is
|
||||
// invalid in which case we've already gotten an error about this.
|
||||
if (parentCompilationUnit.languageVersion != part.languageVersion &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
parentCompilationUnit.languageVersion.valid &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
part.languageVersion.valid) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
// This is an error, but the part is not removed from the list of
|
||||
// parts, so that metadata annotations can be associated with it.
|
||||
List<LocatedMessage> context = <LocatedMessage>[];
|
||||
if (parentCompilationUnit.languageVersion.isExplicit) {
|
||||
context.add(messageLanguageVersionLibraryContext.withLocation(
|
||||
parentCompilationUnit.languageVersion.fileUri!,
|
||||
parentCompilationUnit.languageVersion.charOffset,
|
||||
parentCompilationUnit.languageVersion.charCount));
|
||||
}
|
||||
|
||||
if (part.isPatch) {
|
||||
if (part.languageVersion.isExplicit) {
|
||||
// Patches are implicitly include, so if we have an explicit language
|
||||
// version, then point to this instead of the top of the file.
|
||||
partOffset = part.languageVersion.charOffset;
|
||||
partUri = part.languageVersion.fileUri!;
|
||||
context.add(messageLanguageVersionPatchContext.withLocation(
|
||||
part.languageVersion.fileUri!,
|
||||
part.languageVersion.charOffset,
|
||||
part.languageVersion.charCount));
|
||||
}
|
||||
parentCompilationUnit.addProblem(messageLanguageVersionMismatchInPatch,
|
||||
partOffset, noLength, partUri,
|
||||
context: context);
|
||||
} else {
|
||||
if (part.languageVersion.isExplicit) {
|
||||
context.add(messageLanguageVersionPartContext.withLocation(
|
||||
part.languageVersion.fileUri!,
|
||||
part.languageVersion.charOffset,
|
||||
part.languageVersion.charCount));
|
||||
}
|
||||
parentCompilationUnit.addProblem(
|
||||
messageLanguageVersionMismatchInPart, partOffset, noLength, partUri,
|
||||
context: context);
|
||||
}
|
||||
}
|
||||
|
||||
includedParts.add(part);
|
||||
part.becomePart(libraryBuilder, libraryNameSpaceBuilder,
|
||||
parentCompilationUnit, includedParts, usedParts,
|
||||
allowPartInParts: allowPartInParts);
|
||||
}
|
||||
|
||||
void _becomePart(SourceLibraryBuilder libraryBuilder,
|
||||
LibraryNameSpaceBuilder libraryNameSpaceBuilder) {
|
||||
libraryNameSpaceBuilder.includeBuilders(_libraryNameSpaceBuilder);
|
||||
@@ -780,7 +850,8 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
LibraryNameSpaceBuilder libraryNameSpaceBuilder,
|
||||
SourceCompilationUnit parentCompilationUnit,
|
||||
List<SourceCompilationUnit> includedParts,
|
||||
Set<Uri> usedParts) {
|
||||
Set<Uri> usedParts,
|
||||
{required bool allowPartInParts}) {
|
||||
assert(
|
||||
_libraryBuilder == null,
|
||||
"Compilation unit $this is already part of library $_libraryBuilder. "
|
||||
@@ -788,14 +859,14 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
_libraryBuilder = libraryBuilder;
|
||||
_partOfLibrary = libraryBuilder;
|
||||
_parentCompilationUnit = parentCompilationUnit;
|
||||
if (!libraryFeatures.enhancedParts.isEnabled) {
|
||||
if (!allowPartInParts) {
|
||||
if (_builderFactoryResult.parts.isNotEmpty) {
|
||||
List<LocatedMessage> context = <LocatedMessage>[
|
||||
messagePartInPartLibraryContext.withLocation(
|
||||
libraryBuilder.fileUri, -1, 1),
|
||||
];
|
||||
for (Part part in _builderFactoryResult.parts) {
|
||||
addProblem(messagePartInPart, part.offset, noLength, fileUri,
|
||||
addProblem(messagePartInPart, part.fileOffset, noLength, fileUri,
|
||||
context: context);
|
||||
// Mark this part as used so we don't report it as orphaned.
|
||||
usedParts.add(part.compilationUnit.importUri);
|
||||
@@ -806,7 +877,10 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
|
||||
} else {
|
||||
_becomePart(libraryBuilder, libraryNameSpaceBuilder);
|
||||
_includeParts(
|
||||
libraryBuilder, libraryNameSpaceBuilder, includedParts, usedParts);
|
||||
libraryBuilder: libraryBuilder,
|
||||
libraryNameSpaceBuilder: libraryNameSpaceBuilder,
|
||||
includedParts: includedParts,
|
||||
usedParts: usedParts);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,13 @@ abstract class SourceConstructorBuilder implements ConstructorBuilder {
|
||||
@override
|
||||
DeclarationBuilder get declarationBuilder;
|
||||
|
||||
void buildOutlineNodes(BuildNodesCallback f);
|
||||
|
||||
void buildOutlineExpressions(ClassHierarchy classHierarchy,
|
||||
List<DelayedDefaultValueCloner> delayedDefaultValueCloners);
|
||||
|
||||
int buildBodyNodes(BuildNodesCallback f);
|
||||
|
||||
/// Infers the types of any untyped initializing formals.
|
||||
void inferFormalTypes(ClassHierarchyBase hierarchy);
|
||||
|
||||
@@ -151,6 +155,7 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
Builder get parent => declarationBuilder;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
List<MetadataBuilder>? get metadata => _introductory.metadata;
|
||||
|
||||
@override
|
||||
@@ -209,8 +214,7 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
// Coverage-ignore(suite): Not run.
|
||||
List<SourceConstructorBuilder>? get augmentationsForTesting => _augmentations;
|
||||
|
||||
@override
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
void _addAugmentation(Builder augmentation) {
|
||||
if (augmentation is SourceConstructorBuilderImpl) {
|
||||
if (checkAugmentation(
|
||||
augmentationLibraryBuilder: augmentation.libraryBuilder,
|
||||
@@ -228,6 +232,17 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void addAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get isRedirecting => _introductory.isRedirecting;
|
||||
|
||||
@@ -551,6 +566,13 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
// it has issues, so do the constructors.
|
||||
inErrorRecovery: inErrorRecovery);
|
||||
context.reportGenericFunctionTypesForFormals(formals);
|
||||
List<SourceConstructorBuilderImpl>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceConstructorBuilderImpl augmentation in augmentations) {
|
||||
count += augmentation.computeDefaultTypes(context,
|
||||
inErrorRecovery: inErrorRecovery);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -622,14 +644,33 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
libraryBuilder: libraryBuilder,
|
||||
declarationConstructor: invokeTarget,
|
||||
delayedDefaultValueCloners: _delayedDefaultValueCloners);
|
||||
List<SourceConstructorBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceConstructorBuilder augmentation in augmentations) {
|
||||
augmentation.buildOutlineNodes((
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
// Don't add augmentations.
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int buildBodyNodes(BuildNodesCallback f) {
|
||||
_introductory.buildBody();
|
||||
if (!isAugmenting) return 0;
|
||||
_introductory.finishAugmentation(origin);
|
||||
return 1;
|
||||
int count = 0;
|
||||
List<SourceConstructorBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceConstructorBuilder augmentation in augmentations) {
|
||||
count += augmentation.buildBodyNodes(f);
|
||||
}
|
||||
}
|
||||
if (isAugmenting) {
|
||||
_introductory.finishAugmentation(origin);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -707,9 +748,18 @@ class SourceConstructorBuilderImpl extends SourceMemberBuilderImpl
|
||||
|
||||
beginInitializers = null;
|
||||
_hasBuiltOutlines = true;
|
||||
|
||||
List<SourceConstructorBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceConstructorBuilder augmentation in augmentations) {
|
||||
augmentation.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
String get fullNameForErrors {
|
||||
return "${declarationBuilder.name}"
|
||||
"${name.isEmpty ? '' : '.$name'}";
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import 'package:kernel/ast.dart';
|
||||
import 'package:kernel/class_hierarchy.dart';
|
||||
|
||||
import '../base/common.dart';
|
||||
import '../base/modifiers.dart';
|
||||
import '../base/name_space.dart';
|
||||
import '../base/problems.dart';
|
||||
@@ -19,6 +18,8 @@ import '../codes/cfe_codes.dart'
|
||||
show
|
||||
messagePatchDeclarationMismatch,
|
||||
messagePatchDeclarationOrigin,
|
||||
messagePatchExtensionOrigin,
|
||||
messagePatchExtensionTypeParametersMismatch,
|
||||
noLength;
|
||||
import '../fragment/fragment.dart';
|
||||
import '../kernel/body_builder_context.dart';
|
||||
@@ -44,7 +45,7 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
|
||||
late final Extension _extension;
|
||||
|
||||
SourceExtensionBuilder? _origin;
|
||||
SourceExtensionBuilder? augmentationForTesting;
|
||||
SourceExtensionBuilder? _augmentation;
|
||||
|
||||
MergedClassMemberScope? _mergedScope;
|
||||
|
||||
@@ -104,6 +105,7 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
|
||||
extensionName.attachExtension(_extension);
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
// TODO(johnniwinther): Avoid exposing this. Annotations for macros and
|
||||
// patches should be computing from within the builder.
|
||||
Iterable<MetadataBuilder>? get metadata => _introductory.metadata;
|
||||
@@ -128,8 +130,15 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
|
||||
@override
|
||||
bool get isAugment => _modifiers.isAugment;
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
SourceExtensionBuilder? get augmentationForTesting => _augmentation;
|
||||
|
||||
@override
|
||||
void buildScopes(LibraryBuilder coreLibrary) {
|
||||
SourceExtensionBuilder? augmentation = _augmentation;
|
||||
if (augmentation != null) {
|
||||
_nameSpaceBuilder.includeBuilders(augmentation._nameSpaceBuilder);
|
||||
}
|
||||
_nameSpace = _nameSpaceBuilder.buildNameSpace(
|
||||
loader: libraryBuilder.loader,
|
||||
problemReporting: libraryBuilder,
|
||||
@@ -142,6 +151,10 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
|
||||
containerType: ContainerType.Extension,
|
||||
containerName: extensionName,
|
||||
includeConstructors: false);
|
||||
if (augmentation != null) {
|
||||
augmentation.buildScopes(coreLibrary);
|
||||
_applyAugmentation(augmentation);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -203,6 +216,12 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
|
||||
_introductory.enclosingScope);
|
||||
|
||||
super.buildOutlineExpressions(classHierarchy, delayedDefaultValueCloners);
|
||||
|
||||
SourceExtensionBuilder? augmentation = _augmentation;
|
||||
if (augmentation != null) {
|
||||
augmentation.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -269,32 +288,15 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
|
||||
}
|
||||
|
||||
@override
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
void addAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
SourceExtensionBuilder? _addAugmentation(Builder augmentation) {
|
||||
if (augmentation is SourceExtensionBuilder) {
|
||||
augmentation._origin = this;
|
||||
if (retainDataForTesting) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentationForTesting = augmentation;
|
||||
}
|
||||
// TODO(johnniwinther): Check that type parameters and on-type match
|
||||
// with origin declaration.
|
||||
|
||||
nameSpace.forEachLocalMember((String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: false);
|
||||
if (memberAugmentation != null) {
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
nameSpace.forEachLocalSetter(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: true);
|
||||
if (memberAugmentation != null) {
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
_augmentation = augmentation;
|
||||
return augmentation;
|
||||
} else {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
libraryBuilder.addProblem(messagePatchDeclarationMismatch,
|
||||
@@ -302,6 +304,51 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
|
||||
messagePatchDeclarationOrigin.withLocation(
|
||||
fileUri, fileOffset, noLength)
|
||||
]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
void _applyAugmentation(SourceExtensionBuilder augmentation) {
|
||||
// TODO(johnniwinther): Check that on-type match with origin declaration.
|
||||
|
||||
int originLength = typeParameters?.length ?? 0;
|
||||
int augmentationLength = augmentation.typeParameters?.length ?? 0;
|
||||
if (originLength != augmentationLength) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentation.addProblem(messagePatchExtensionTypeParametersMismatch,
|
||||
augmentation.fileOffset, noLength, context: [
|
||||
messagePatchExtensionOrigin.withLocation(fileUri, fileOffset, noLength)
|
||||
]);
|
||||
} else if (typeParameters != null) {
|
||||
int count = 0;
|
||||
for (NominalParameterBuilder t in augmentation.typeParameters!) {
|
||||
typeParameters![count++].applyAugmentation(t);
|
||||
}
|
||||
}
|
||||
nameSpace.forEachLocalMember((String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: false);
|
||||
if (memberAugmentation != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
nameSpace.forEachLocalSetter((String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: true);
|
||||
if (memberAugmentation != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
SourceExtensionBuilder? extensionBuilder = _addAugmentation(augmentation);
|
||||
if (extensionBuilder != null) {
|
||||
_applyAugmentation(extensionBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class SourceExtensionTypeDeclarationBuilder
|
||||
final Modifiers _modifiers;
|
||||
|
||||
@override
|
||||
final List<ConstructorReferenceBuilder>? constructorReferences;
|
||||
final List<ConstructorReferenceBuilder> constructorReferences;
|
||||
|
||||
late final ExtensionTypeDeclaration _extensionTypeDeclaration;
|
||||
|
||||
@@ -90,6 +90,8 @@ class SourceExtensionTypeDeclarationBuilder
|
||||
|
||||
Nullability? _nullability;
|
||||
|
||||
SourceExtensionTypeDeclarationBuilder? _augmentation;
|
||||
|
||||
SourceExtensionTypeDeclarationBuilder(
|
||||
{required this.name,
|
||||
required SourceLibraryBuilder enclosingLibraryBuilder,
|
||||
@@ -124,6 +126,16 @@ class SourceExtensionTypeDeclarationBuilder
|
||||
..fileOffset = nameOffset;
|
||||
}
|
||||
|
||||
// TODO(johnniwinther): Remove this when augmentations are handled through
|
||||
// fragments.
|
||||
@override
|
||||
List<SourceExtensionTypeDeclarationBuilder>? get augmentations =>
|
||||
_augmentation != null
|
||||
?
|
||||
// Coverage-ignore(suite): Not run.
|
||||
[_augmentation!]
|
||||
: const [];
|
||||
|
||||
// TODO(johnniwinther): Remove this when augmentations are handled through
|
||||
// fragments.
|
||||
@override
|
||||
@@ -162,6 +174,11 @@ class SourceExtensionTypeDeclarationBuilder
|
||||
indexedContainer: indexedContainer,
|
||||
containerType: ContainerType.ExtensionType,
|
||||
containerName: new ClassName(name));
|
||||
SourceExtensionTypeDeclarationBuilder? augmentation = _augmentation;
|
||||
if (augmentation != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
_applyAugmentation(augmentation);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -835,32 +852,55 @@ class SourceExtensionTypeDeclarationBuilder
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
void addAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
SourceExtensionTypeDeclarationBuilder? _addAugmentation(
|
||||
Builder augmentation) {
|
||||
if (augmentation is SourceExtensionTypeDeclarationBuilder) {
|
||||
augmentation._origin = this;
|
||||
nameSpace.forEachLocalMember((String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: false);
|
||||
if (memberAugmentation != null) {
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
nameSpace.forEachLocalSetter((String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: true);
|
||||
if (memberAugmentation != null) {
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
|
||||
// TODO(johnniwinther): Check that type parameters and on-type match
|
||||
// with origin declaration.
|
||||
_augmentation = augmentation;
|
||||
return augmentation;
|
||||
} else {
|
||||
libraryBuilder.addProblem(messagePatchDeclarationMismatch,
|
||||
augmentation.fileOffset, noLength, augmentation.fileUri, context: [
|
||||
messagePatchDeclarationOrigin.withLocation(
|
||||
fileUri, fileOffset, noLength)
|
||||
]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void _applyAugmentation(SourceExtensionTypeDeclarationBuilder augmentation) {
|
||||
nameSpace.forEachLocalMember((String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: false);
|
||||
if (memberAugmentation != null) {
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
nameSpace.forEachLocalSetter((String name, Builder member) {
|
||||
Builder? memberAugmentation =
|
||||
augmentation.nameSpace.lookupLocalMember(name, setter: true);
|
||||
if (memberAugmentation != null) {
|
||||
member.applyAugmentation(memberAugmentation);
|
||||
}
|
||||
});
|
||||
|
||||
// TODO(johnniwinther): Check that type parameters and on-type match
|
||||
// with origin declaration.
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
SourceExtensionTypeDeclarationBuilder? extensionTypeDeclarationBuilder =
|
||||
_addAugmentation(augmentation);
|
||||
if (extensionTypeDeclarationBuilder != null) {
|
||||
_applyAugmentation(extensionTypeDeclarationBuilder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ class SourceFactoryBuilder extends SourceMemberBuilderImpl
|
||||
tearOffReference: tearOffReference);
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
List<MetadataBuilder>? get metadata => _introductory.metadata;
|
||||
|
||||
@override
|
||||
@@ -274,7 +275,11 @@ class SourceFactoryBuilder extends SourceMemberBuilderImpl
|
||||
throw new UnsupportedError('${runtimeType}.localSetters');
|
||||
|
||||
@override
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
void addAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
void _addAugmentation(Builder augmentation) {
|
||||
if (augmentation is SourceFactoryBuilder) {
|
||||
if (checkAugmentation(
|
||||
augmentationLibraryBuilder: augmentation.libraryBuilder,
|
||||
@@ -292,18 +297,40 @@ class SourceFactoryBuilder extends SourceMemberBuilderImpl
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
@override
|
||||
int buildBodyNodes(BuildNodesCallback f) {
|
||||
if (!isAugmenting) return 0;
|
||||
_finishAugmentation();
|
||||
return 1;
|
||||
int count = 0;
|
||||
List<SourceFactoryBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceFactoryBuilder augmentation in augmentations) {
|
||||
count += augmentation.buildBodyNodes(f);
|
||||
}
|
||||
}
|
||||
if (isAugmenting) {
|
||||
_finishAugmentation();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@override
|
||||
int computeDefaultTypes(ComputeDefaultTypeContext context,
|
||||
{required bool inErrorRecovery}) {
|
||||
return _encoding.computeDefaultTypes(context,
|
||||
int count = _encoding.computeDefaultTypes(context,
|
||||
inErrorRecovery: inErrorRecovery);
|
||||
List<SourceFactoryBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceFactoryBuilder augmentation in augmentations) {
|
||||
count += augmentation.computeDefaultTypes(context,
|
||||
inErrorRecovery: inErrorRecovery);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -377,6 +404,17 @@ class SourceFactoryBuilder extends SourceMemberBuilderImpl
|
||||
@override
|
||||
void buildOutlineNodes(BuildNodesCallback f) {
|
||||
_encoding.buildOutlineNodes(f);
|
||||
List<SourceFactoryBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceFactoryBuilder augmentation in augmentations) {
|
||||
augmentation.buildOutlineNodes((
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
// Don't add augmentations.
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool _hasBuiltOutlineExpressions = false;
|
||||
@@ -398,6 +436,14 @@ class SourceFactoryBuilder extends SourceMemberBuilderImpl
|
||||
if (isConst && isAugmenting) {
|
||||
_finishAugmentation();
|
||||
}
|
||||
|
||||
List<SourceFactoryBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceFactoryBuilder augmentation in augmentations) {
|
||||
augmentation.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _finishAugmentation() {
|
||||
@@ -421,6 +467,13 @@ class SourceFactoryBuilder extends SourceMemberBuilderImpl
|
||||
|
||||
void resolveRedirectingFactory() {
|
||||
_encoding.resolveRedirectingFactory();
|
||||
|
||||
List<SourceFactoryBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceFactoryBuilder augmentation in augmentations) {
|
||||
augmentation.resolveRedirectingFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _setRedirectingFactoryBody(Member target, List<DartType> typeArguments) {
|
||||
|
||||
@@ -163,7 +163,9 @@ bool checkAugmentation(
|
||||
{required SourceLibraryBuilder augmentationLibraryBuilder,
|
||||
required Builder origin,
|
||||
required Builder augmentation}) {
|
||||
if (!origin.isExternal && !augmentationLibraryBuilder.isAugmentationLibrary) {
|
||||
if (!origin.isExternal &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
!augmentationLibraryBuilder.isAugmentationLibrary) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentationLibraryBuilder.addProblem(messagePatchNonExternal,
|
||||
augmentation.fileOffset, noLength, augmentation.fileUri!,
|
||||
|
||||
@@ -241,7 +241,9 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
required NameSpace importNameSpace,
|
||||
required LibraryNameSpaceBuilder libraryNameSpaceBuilder}) {
|
||||
Library library = target ??
|
||||
(origin?.library ??
|
||||
(origin
|
||||
// Coverage-ignore(suite): Not run.
|
||||
?.library ??
|
||||
new Library(importUri,
|
||||
fileUri: fileUri,
|
||||
reference: referenceIsPartOwner == true
|
||||
@@ -249,7 +251,10 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
: indexedLibrary?.library.reference)
|
||||
..setLanguageVersion(packageLanguageVersion.version));
|
||||
LibraryName libraryName = new LibraryName(library.reference);
|
||||
NameSpace exportNameSpace = origin?.exportNameSpace ?? new NameSpaceImpl();
|
||||
NameSpace exportNameSpace = origin
|
||||
// Coverage-ignore(suite): Not run.
|
||||
?.exportNameSpace ??
|
||||
new NameSpaceImpl();
|
||||
return new SourceLibraryBuilder._(
|
||||
compilationUnit: compilationUnit,
|
||||
loader: loader,
|
||||
@@ -355,6 +360,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
bool get mayImplementRestrictedTypes =>
|
||||
compilationUnit.mayImplementRestrictedTypes;
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
/// `true` if this is an augmentation library.
|
||||
bool get isAugmentationLibrary => compilationUnit.forAugmentationLibrary;
|
||||
|
||||
@@ -364,6 +370,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
@override
|
||||
bool get isUnsupported => compilationUnit.isUnsupported;
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
MergedLibraryScope get mergedScope {
|
||||
return _mergedScope ??=
|
||||
isAugmenting ? origin.mergedScope : new MergedLibraryScope(this);
|
||||
@@ -397,6 +404,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceCompilationUnit> get parts => _parts;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isPart => compilationUnit.isPart;
|
||||
|
||||
@override
|
||||
@@ -417,6 +425,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? get augmentationLibraries =>
|
||||
_augmentationLibraries;
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void addAugmentationLibrary(SourceLibraryBuilder augmentationLibrary) {
|
||||
assert(augmentationLibrary.isAugmenting,
|
||||
"Library ${augmentationLibrary} must be a augmentation library.");
|
||||
@@ -461,6 +470,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.computeSupertypes();
|
||||
}
|
||||
@@ -481,6 +491,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.buildOutlineNodes(coreLibrary);
|
||||
}
|
||||
@@ -541,6 +552,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
// Augmentation libraries don't have their own export scope.
|
||||
augmentationLibrary.state =
|
||||
@@ -558,6 +570,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
// Augmentation libraries don't have their own export scope.
|
||||
// TODO(johnniwinther): Do we need this?
|
||||
@@ -638,6 +651,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.buildNameSpace();
|
||||
}
|
||||
@@ -669,6 +683,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.buildScopes(coreLibrary);
|
||||
}
|
||||
@@ -683,6 +698,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
}
|
||||
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.applyAugmentations();
|
||||
}
|
||||
@@ -700,6 +716,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
typeCount += augmentationLibrary.resolveTypes();
|
||||
}
|
||||
@@ -719,6 +736,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.installDefaultSupertypes(
|
||||
objectClassBuilder, objectClass);
|
||||
@@ -738,6 +756,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.collectSourceClassesAndExtensionTypes(
|
||||
sourceClasses, sourceExtensionTypes);
|
||||
@@ -764,6 +783,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
count += augmentationLibrary.resolveConstructors();
|
||||
}
|
||||
@@ -982,6 +1002,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.takeMixinApplications(mixinApplications);
|
||||
}
|
||||
@@ -997,6 +1018,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
@@ -1136,6 +1158,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
!declaration.isDuplicate &&
|
||||
!declaration.isConflictingSetter) {
|
||||
if (declaration.isConflictingAugmentationMember) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
member.name = new Name(
|
||||
'${member.name.text}'
|
||||
'#${declaration.libraryBuilder.augmentationIndex}',
|
||||
@@ -1163,6 +1186,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
total += augmentationLibrary.finishDeferredLoadTearOffs();
|
||||
}
|
||||
@@ -1181,6 +1205,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
count += augmentationLibrary.finishForwarders();
|
||||
}
|
||||
@@ -1240,6 +1265,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
count += augmentationLibrary.finishNativeMethods();
|
||||
}
|
||||
@@ -1268,6 +1294,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.collectUnboundTypeParameters(
|
||||
nominalParameters, structuralParameters);
|
||||
@@ -1302,6 +1329,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
count += augmentationLibrary.computeVariances();
|
||||
}
|
||||
@@ -1326,6 +1354,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
count += augmentationLibrary.computeDefaultTypes(
|
||||
dynamicType, nullType, bottomType, objectClass);
|
||||
@@ -1339,12 +1368,12 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
return count;
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
/// If this is an augmentation library, apply its augmentations to [origin].
|
||||
void applyAugmentations() {
|
||||
if (!isAugmenting) return;
|
||||
|
||||
if (_languageVersion != origin._languageVersion) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
List<LocatedMessage> context = <LocatedMessage>[];
|
||||
if (origin._languageVersion.isExplicit) {
|
||||
context.add(messageLanguageVersionLibraryContext.withLocation(
|
||||
@@ -1379,6 +1408,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
count += augmentationLibrary.buildBodyNodes();
|
||||
}
|
||||
@@ -1388,13 +1418,14 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
while (iterator.moveNext()) {
|
||||
Builder builder = iterator.current;
|
||||
if (builder is SourceMemberBuilder) {
|
||||
count += builder.buildBodyNodes((
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
count += builder.buildBodyNodes(
|
||||
// Coverage-ignore(suite): Not run.
|
||||
(
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
_addMemberToLibrary(builder, member);
|
||||
if (tearOff != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
_addMemberToLibrary(builder, tearOff);
|
||||
}
|
||||
});
|
||||
@@ -1841,6 +1872,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
augmentationLibrary.checkTypesInOutline(typeEnvironment);
|
||||
}
|
||||
@@ -2072,12 +2104,12 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
this.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
List<DelayedDefaultValueCloner>?
|
||||
augmentationLibraryDelayedDefaultValueCloners =
|
||||
augmentationLibrary.installTypedefTearOffs();
|
||||
if (augmentationLibraryDelayedDefaultValueCloners != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
(delayedDefaultValueCloners ??= [])
|
||||
.addAll(augmentationLibraryDelayedDefaultValueCloners);
|
||||
}
|
||||
@@ -2418,8 +2450,12 @@ class SourceLibraryBuilderMemberNameIterator<T extends Builder>
|
||||
}
|
||||
|
||||
class Part {
|
||||
final int offset;
|
||||
final Uri fileUri;
|
||||
final int fileOffset;
|
||||
final CompilationUnit compilationUnit;
|
||||
|
||||
Part(this.offset, this.compilationUnit);
|
||||
Part(
|
||||
{required this.fileUri,
|
||||
required this.fileOffset,
|
||||
required this.compilationUnit});
|
||||
}
|
||||
|
||||
@@ -342,7 +342,6 @@ class SourceLoader extends Loader {
|
||||
_loadedLibraryBuilders[uri] = libraryBuilder;
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
LibraryBuilder? deregisterLoadedLibraryBuilder(Uri importUri) {
|
||||
LibraryBuilder? libraryBuilder = _loadedLibraryBuilders.remove(importUri);
|
||||
if (libraryBuilder != null) {
|
||||
@@ -1245,6 +1244,7 @@ severity: $severity
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
library.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
await buildBody(augmentationLibrary);
|
||||
}
|
||||
@@ -1425,24 +1425,6 @@ severity: $severity
|
||||
library.includeParts(usedParts);
|
||||
}
|
||||
|
||||
List<SourceLibraryBuilder> augmentationLibraries = [];
|
||||
|
||||
// Create augmentation libraries now that normal libraries have been
|
||||
// created.
|
||||
for (SourceCompilationUnit compilationUnit
|
||||
in augmentationCompilationUnits) {
|
||||
SourceLibraryBuilder sourceLibraryBuilder =
|
||||
compilationUnit.createLibrary();
|
||||
// TODO(johnniwinther): Avoid creating a [SourceLibraryBuilder]
|
||||
// for augmentation libraries.
|
||||
augmentationLibraries.add(sourceLibraryBuilder);
|
||||
}
|
||||
|
||||
// Include parts in augment libraries.
|
||||
for (SourceLibraryBuilder library in augmentationLibraries) {
|
||||
library.includeParts(usedParts);
|
||||
}
|
||||
|
||||
for (MapEntry<Uri, SourceCompilationUnit> entry in parts.entries) {
|
||||
Uri uri = entry.key;
|
||||
SourceCompilationUnit part = entry.value;
|
||||
@@ -1461,26 +1443,7 @@ severity: $severity
|
||||
}
|
||||
ticker.logMs("Resolved parts");
|
||||
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
_compilationUnits.remove(augmentationLibrary.fileUri);
|
||||
augmentationLibrary.origin.addAugmentationLibrary(augmentationLibrary);
|
||||
}
|
||||
_sourceLibraryBuilders = sourceLibraries;
|
||||
assert(
|
||||
_compilationUnits.values.every((compilationUnit) =>
|
||||
!(compilationUnit is SourceCompilationUnit &&
|
||||
compilationUnit.isAugmenting)),
|
||||
"Augmentation library found in libraryBuilders: " +
|
||||
_compilationUnits.values
|
||||
.where((compilationUnit) =>
|
||||
!(compilationUnit is SourceCompilationUnit &&
|
||||
compilationUnit.isAugmenting))
|
||||
.join(', ') +
|
||||
".");
|
||||
assert(
|
||||
sourceLibraries.every((library) => !library.isAugmenting),
|
||||
"Augmentation library found in sourceLibraryBuilders: "
|
||||
"${sourceLibraries.where((library) => library.isAugmenting)}.");
|
||||
assert(
|
||||
_compilationUnits.values.every((compilationUnit) =>
|
||||
compilationUnit.loader != this ||
|
||||
@@ -2687,6 +2650,7 @@ severity: $severity
|
||||
Iterable<SourceLibraryBuilder>? augmentationLibraries =
|
||||
libraryBuilder.augmentationLibraries;
|
||||
if (augmentationLibraries != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
for (SourceLibraryBuilder augmentationLibrary in augmentationLibraries) {
|
||||
_checkMainMethods(augmentationLibrary, listOfString);
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ abstract class SourceMemberBuilderImpl extends MemberBuilderImpl
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void set isConflictingAugmentationMember(bool value) {
|
||||
assert(_isConflictingAugmentationMember == null,
|
||||
'$this.isConflictingAugmentationMember has already been fixed.');
|
||||
@@ -201,6 +202,7 @@ class MemberDataForTesting {
|
||||
final InferenceDataForTesting inferenceData = new InferenceDataForTesting();
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
class AugmentSuperTarget {
|
||||
final SourceMemberBuilder declaration;
|
||||
final Member? readTarget;
|
||||
|
||||
@@ -102,6 +102,7 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
Builder get parent => declarationBuilder ?? libraryBuilder;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isAugmentation => _modifiers.isAugment;
|
||||
|
||||
@override
|
||||
@@ -137,19 +138,25 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
invokeTarget as Annotatable,
|
||||
];
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
// TODO(johnniwinther): Remove this. This is only needed for detecting patches
|
||||
// and macro annotations and we should use the fragment directly once
|
||||
// augmentations are fragments.
|
||||
List<MetadataBuilder>? get metadata => _introductory.metadata;
|
||||
|
||||
@override
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
void addAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
void _addAugmentation(Builder augmentation) {
|
||||
if (augmentation is SourceMethodBuilder) {
|
||||
if (checkAugmentation(
|
||||
augmentationLibraryBuilder: augmentation.libraryBuilder,
|
||||
origin: this,
|
||||
augmentation: augmentation)) {
|
||||
augmentation._origin = this;
|
||||
|
||||
SourceMethodBuilder augmentedBuilder =
|
||||
_augmentations == null ? this : _augmentations!.last;
|
||||
augmentation._augmentedBuilder = augmentedBuilder;
|
||||
@@ -166,6 +173,12 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
@override
|
||||
SourceMethodBuilder get origin => _origin ?? this;
|
||||
|
||||
@@ -182,13 +195,13 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
|
||||
Map<SourceMethodBuilder, AugmentSuperTarget?> _augmentedMethods = {};
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? _createAugmentSuperTarget(
|
||||
SourceMethodBuilder? targetBuilder) {
|
||||
if (targetBuilder == null) return null;
|
||||
|
||||
Procedure declaredMethod = targetBuilder._introductory.invokeTarget;
|
||||
if (declaredMethod.isAbstract || declaredMethod.isExternal) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
return targetBuilder._augmentedBuilder != null
|
||||
? _getAugmentSuperTarget(targetBuilder._augmentedBuilder!)
|
||||
: null;
|
||||
@@ -212,12 +225,14 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
writeTarget: null);
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? _getAugmentSuperTarget(SourceMethodBuilder augmentation) {
|
||||
return _augmentedMethods[augmentation] ??=
|
||||
_createAugmentSuperTarget(augmentation._augmentedBuilder);
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? get augmentSuperTarget =>
|
||||
origin._getAugmentSuperTarget(this);
|
||||
|
||||
@@ -228,6 +243,7 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
void addAugmentedMethod(SourceMethodBuilder builder) {
|
||||
Procedure? augmentedMethod = builder._augmentedMethod;
|
||||
if (augmentedMethod != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentedMethod
|
||||
..fileOffset = builder._introductory.invokeTarget.fileOffset
|
||||
..fileEndOffset = builder._introductory.invokeTarget.fileEndOffset
|
||||
@@ -257,6 +273,17 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
reference: _reference,
|
||||
tearOffReference: _tearOffReference,
|
||||
classTypeParameters: classBuilder?.cls.typeParameters);
|
||||
List<SourceMethodBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceMethodBuilder augmentation in augmentations) {
|
||||
augmentation.buildOutlineNodes((
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
// Don't add augmentations.
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool hasBuiltOutlineExpressions = false;
|
||||
@@ -269,6 +296,13 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
declarationBuilder, invokeTarget as Annotatable,
|
||||
isClassInstanceMember: isClassInstanceMember,
|
||||
createFileUriExpression: isAugmented);
|
||||
List<SourceMethodBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceMethodBuilder augmentation in augmentations) {
|
||||
augmentation.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
}
|
||||
}
|
||||
hasBuiltOutlineExpressions = true;
|
||||
}
|
||||
}
|
||||
@@ -322,8 +356,11 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
Name get memberName => _memberName.name;
|
||||
|
||||
@override
|
||||
Member? get readTarget =>
|
||||
isAugmenting ? _origin!.readTarget : _introductory.readTarget;
|
||||
Member? get readTarget => isAugmenting
|
||||
?
|
||||
// Coverage-ignore(suite): Not run.
|
||||
_origin!.readTarget
|
||||
: _introductory.readTarget;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
@@ -350,7 +387,17 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl
|
||||
@override
|
||||
int computeDefaultTypes(ComputeDefaultTypeContext context,
|
||||
{required bool inErrorRecovery}) {
|
||||
return _introductory.computeDefaultTypes(context);
|
||||
int count = _introductory.computeDefaultTypes(context);
|
||||
if (declarationBuilder == null) {
|
||||
List<SourceMethodBuilder>? augmentations = _augmentations;
|
||||
if (augmentations != null) {
|
||||
for (SourceMethodBuilder augmentation in augmentations) {
|
||||
count += augmentation.computeDefaultTypes(context,
|
||||
inErrorRecovery: inErrorRecovery);
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -130,6 +130,7 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
Builder get parent => declarationBuilder ?? libraryBuilder;
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
bool get isAugmentation => _modifiers.isAugment;
|
||||
|
||||
@override
|
||||
@@ -163,18 +164,21 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
writeTarget as Annotatable
|
||||
];
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
// TODO(johnniwinther): Remove this. This is only needed for detecting patches
|
||||
// and macro annotations and we should use the fragment directly once
|
||||
// augmentations are fragments.
|
||||
List<MetadataBuilder>? get metadata =>
|
||||
_introductoryGetable?.metadata ??
|
||||
_introductorySetable
|
||||
// Coverage-ignore(suite): Not run.
|
||||
?.metadata ??
|
||||
_introductorySetable?.metadata ??
|
||||
_introductoryField?.metadata;
|
||||
|
||||
@override
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
void addAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
void _addAugmentation(Builder augmentation) {
|
||||
if (augmentation is SourcePropertyBuilder) {
|
||||
if (checkAugmentation(
|
||||
augmentationLibraryBuilder: augmentation.libraryBuilder,
|
||||
@@ -182,8 +186,11 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
augmentation: augmentation)) {
|
||||
augmentation._origin = this;
|
||||
if (augmentation.isSetter) {
|
||||
SourcePropertyBuilder augmentedBuilder =
|
||||
_setterAugmentations == null ? this : _setterAugmentations!.last;
|
||||
SourcePropertyBuilder augmentedBuilder = _setterAugmentations == null
|
||||
? this
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
_setterAugmentations!.last;
|
||||
augmentation._augmentedBuilder = augmentedBuilder;
|
||||
augmentation._augmentationIndex =
|
||||
augmentedBuilder._augmentationIndex + 1;
|
||||
@@ -209,6 +216,12 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
void applyAugmentation(Builder augmentation) {
|
||||
_addAugmentation(augmentation);
|
||||
}
|
||||
|
||||
@override
|
||||
SourcePropertyBuilder get origin => _origin ?? this;
|
||||
|
||||
@@ -234,6 +247,7 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
|
||||
Map<SourcePropertyBuilder, AugmentSuperTarget?> _augmentedProcedures = {};
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? _createAugmentSuperTarget(
|
||||
SourcePropertyBuilder? targetBuilder) {
|
||||
if (targetBuilder == null) return null;
|
||||
@@ -243,7 +257,6 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
if (declaredSetter == null) return null;
|
||||
|
||||
if (declaredSetter.isAbstract || declaredSetter.isExternal) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
return targetBuilder._augmentedBuilder != null
|
||||
? _getAugmentSuperTarget(targetBuilder._augmentedBuilder!)
|
||||
: null;
|
||||
@@ -272,7 +285,6 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
if (declaredGetter == null) return null;
|
||||
|
||||
if (declaredGetter.isAbstract || declaredGetter.isExternal) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
return targetBuilder._augmentedBuilder != null
|
||||
? _getAugmentSuperTarget(targetBuilder._augmentedBuilder!)
|
||||
: null;
|
||||
@@ -298,6 +310,7 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
}
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? _getAugmentSuperTarget(
|
||||
SourcePropertyBuilder augmentation) {
|
||||
return _augmentedProcedures[augmentation] ??=
|
||||
@@ -305,6 +318,7 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
}
|
||||
|
||||
@override
|
||||
// Coverage-ignore(suite): Not run.
|
||||
AugmentSuperTarget? get augmentSuperTarget =>
|
||||
origin._getAugmentSuperTarget(this);
|
||||
|
||||
@@ -315,6 +329,7 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
void addAugmentedProcedure(SourcePropertyBuilder builder) {
|
||||
Procedure? augmentedGetter = builder._augmentedGetter;
|
||||
if (augmentedGetter != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentedGetter
|
||||
..fileOffset = builder._introductoryGetable!.readTarget.fileOffset
|
||||
..fileEndOffset =
|
||||
@@ -342,6 +357,7 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
void addAugmentedProcedure(SourcePropertyBuilder builder) {
|
||||
Procedure? augmentedSetter = builder._augmentedSetter;
|
||||
if (augmentedSetter != null) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
augmentedSetter
|
||||
..fileOffset = builder._introductorySetable!.writeTarget.fileOffset
|
||||
..fileEndOffset =
|
||||
@@ -378,6 +394,28 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
_introductorySetable?.buildOutlineNode(
|
||||
libraryBuilder, _nameScheme, f, _references as SetterReference,
|
||||
classTypeParameters: classBuilder?.cls.typeParameters);
|
||||
List<SourcePropertyBuilder>? getterAugmentations = _getterAugmentations;
|
||||
if (getterAugmentations != null) {
|
||||
for (SourcePropertyBuilder augmentation in getterAugmentations) {
|
||||
augmentation.buildOutlineNodes((
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
// Don't add augmentations.
|
||||
});
|
||||
}
|
||||
}
|
||||
List<SourcePropertyBuilder>? setterAugmentations = _setterAugmentations;
|
||||
if (setterAugmentations != null) {
|
||||
for (SourcePropertyBuilder augmentation in setterAugmentations) {
|
||||
augmentation.buildOutlineNodes((
|
||||
{required Member member,
|
||||
Member? tearOff,
|
||||
required BuiltMemberKind kind}) {
|
||||
// Don't add augmentations.
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool hasBuiltOutlineExpressions = false;
|
||||
@@ -405,6 +443,20 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
libraryBuilder, declarationBuilder, writeTarget as Annotatable,
|
||||
isClassInstanceMember: isClassInstanceMember,
|
||||
createFileUriExpression: isAugmented);
|
||||
List<SourcePropertyBuilder>? getterAugmentations = _getterAugmentations;
|
||||
if (getterAugmentations != null) {
|
||||
for (SourcePropertyBuilder augmentation in getterAugmentations) {
|
||||
augmentation.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
}
|
||||
}
|
||||
List<SourcePropertyBuilder>? setterAugmentations = _setterAugmentations;
|
||||
if (setterAugmentations != null) {
|
||||
for (SourcePropertyBuilder augmentation in setterAugmentations) {
|
||||
augmentation.buildOutlineExpressions(
|
||||
classHierarchy, delayedDefaultValueCloners);
|
||||
}
|
||||
}
|
||||
hasBuiltOutlineExpressions = true;
|
||||
}
|
||||
}
|
||||
@@ -536,6 +588,20 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl
|
||||
if (_introductorySetable != null) {
|
||||
count += _introductorySetable!.computeDefaultTypes(context);
|
||||
}
|
||||
List<SourcePropertyBuilder>? getterAugmentations = _getterAugmentations;
|
||||
if (getterAugmentations != null) {
|
||||
for (SourcePropertyBuilder augmentation in getterAugmentations) {
|
||||
count += augmentation.computeDefaultTypes(context,
|
||||
inErrorRecovery: inErrorRecovery);
|
||||
}
|
||||
}
|
||||
List<SourcePropertyBuilder>? setterAugmentations = _setterAugmentations;
|
||||
if (setterAugmentations != null) {
|
||||
for (SourcePropertyBuilder augmentation in setterAugmentations) {
|
||||
count += augmentation.computeDefaultTypes(context,
|
||||
inErrorRecovery: inErrorRecovery);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import 'source_extension_type_declaration_builder.dart';
|
||||
import 'source_factory_builder.dart';
|
||||
import 'source_library_builder.dart';
|
||||
import 'source_loader.dart';
|
||||
import 'source_member_builder.dart';
|
||||
import 'source_method_builder.dart';
|
||||
import 'source_property_builder.dart';
|
||||
import 'source_type_alias_builder.dart';
|
||||
@@ -204,7 +205,6 @@ class _PropertyPreBuilder extends _PreBuilder {
|
||||
}
|
||||
} else {
|
||||
if (fragmentName.isAugment) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
// Example:
|
||||
//
|
||||
// int get foo => 42;
|
||||
@@ -760,7 +760,6 @@ class _ConstructorPreBuilder extends _PreBuilder {
|
||||
bool absorbFragment(
|
||||
ProblemReporting problemReporting, _FragmentName fragmentName) {
|
||||
if (fragmentName.isAugment) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (fragmentName.kind == fragment.kind) {
|
||||
// Example:
|
||||
//
|
||||
@@ -860,7 +859,6 @@ class _ConstructorPreBuilder extends _PreBuilder {
|
||||
void Function(Fragment, {bool conflictingSetter}) createBuilder) {
|
||||
createBuilder(fragment.fragment);
|
||||
for (_FragmentName fragmentName in augmentations) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
createBuilder(fragmentName.fragment);
|
||||
}
|
||||
}
|
||||
@@ -1229,7 +1227,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
fragment: fragment,
|
||||
reference: reference);
|
||||
builders.add(new _AddBuilder(fragment.name, typedefBuilder,
|
||||
fragment.fileUri, fragment.nameOffset));
|
||||
fragment.fileUri, fragment.nameOffset,
|
||||
inPatch: fragment.enclosingCompilationUnit.isPatch));
|
||||
if (reference != null) {
|
||||
loader.buildersCreatedWithReferences[reference] = typedefBuilder;
|
||||
}
|
||||
@@ -1250,8 +1249,9 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
classDeclaration: new RegularClassDeclaration(fragment));
|
||||
fragment.builder = classBuilder;
|
||||
fragment.bodyScope.declarationBuilder = classBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, classBuilder,
|
||||
fragment.fileUri, fragment.fileOffset));
|
||||
builders.add(new _AddBuilder(
|
||||
fragment.name, classBuilder, fragment.fileUri, fragment.fileOffset,
|
||||
inPatch: fragment.enclosingCompilationUnit.isPatch));
|
||||
if (indexedClass != null) {
|
||||
loader.buildersCreatedWithReferences[indexedClass.reference] =
|
||||
classBuilder;
|
||||
@@ -1275,8 +1275,9 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
classDeclaration: new MixinDeclaration(fragment));
|
||||
fragment.builder = mixinBuilder;
|
||||
fragment.bodyScope.declarationBuilder = mixinBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, mixinBuilder,
|
||||
fragment.fileUri, fragment.fileOffset));
|
||||
builders.add(new _AddBuilder(
|
||||
fragment.name, mixinBuilder, fragment.fileUri, fragment.fileOffset,
|
||||
inPatch: fragment.enclosingCompilationUnit.isPatch));
|
||||
if (indexedClass != null) {
|
||||
loader.buildersCreatedWithReferences[indexedClass.reference] =
|
||||
mixinBuilder;
|
||||
@@ -1313,8 +1314,9 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
classDeclaration: classDeclaration);
|
||||
mixinApplications[classBuilder] = mixin;
|
||||
fragment.builder = classBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, classBuilder,
|
||||
fragment.fileUri, fragment.nameOffset));
|
||||
builders.add(new _AddBuilder(
|
||||
fragment.name, classBuilder, fragment.fileUri, fragment.nameOffset,
|
||||
inPatch: fragment.enclosingCompilationUnit.isPatch));
|
||||
if (referencesFromIndexedClass != null) {
|
||||
loader.buildersCreatedWithReferences[
|
||||
referencesFromIndexedClass.reference] = classBuilder;
|
||||
@@ -1344,7 +1346,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
fragment.builder = enumBuilder;
|
||||
fragment.bodyScope.declarationBuilder = enumBuilder;
|
||||
builders.add(new _AddBuilder(
|
||||
fragment.name, enumBuilder, fragment.fileUri, fragment.fileOffset));
|
||||
fragment.name, enumBuilder, fragment.fileUri, fragment.fileOffset,
|
||||
inPatch: fragment.enclosingCompilationUnit.isPatch));
|
||||
if (indexedClass != null) {
|
||||
loader.buildersCreatedWithReferences[indexedClass.reference] =
|
||||
enumBuilder;
|
||||
@@ -1363,7 +1366,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
fragment: fragment,
|
||||
reference: reference);
|
||||
builders.add(new _AddBuilder(fragment.name, extensionBuilder,
|
||||
fragment.fileUri, fragment.fileOffset));
|
||||
fragment.fileUri, fragment.fileOffset,
|
||||
inPatch: fragment.enclosingCompilationUnit.isPatch));
|
||||
if (reference != null) {
|
||||
loader.buildersCreatedWithReferences[reference] = extensionBuilder;
|
||||
}
|
||||
@@ -1392,7 +1396,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
fragment.name,
|
||||
extensionTypeDeclarationBuilder,
|
||||
fragment.fileUri,
|
||||
fragment.fileOffset));
|
||||
fragment.fileOffset,
|
||||
inPatch: fragment.enclosingCompilationUnit.isPatch));
|
||||
case FieldFragment():
|
||||
String name = fragment.name;
|
||||
|
||||
@@ -1436,7 +1441,9 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
references: references);
|
||||
fragment.builder = propertyBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, propertyBuilder,
|
||||
fragment.fileUri, fragment.nameOffset));
|
||||
fragment.fileUri, fragment.nameOffset,
|
||||
inPatch: fragment.enclosingDeclaration?.isPatch ??
|
||||
fragment.enclosingCompilationUnit.isPatch));
|
||||
references.registerReference(loader, propertyBuilder);
|
||||
case GetterFragment():
|
||||
String name = fragment.name;
|
||||
@@ -1458,6 +1465,7 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
indexedContainer ??= indexedLibrary;
|
||||
|
||||
bool isAugmentation = enclosingLibraryBuilder.isAugmenting &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
fragment.modifiers.isAugment;
|
||||
|
||||
GetterReference references = new GetterReference(
|
||||
@@ -1477,7 +1485,9 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
fragment.setBuilder(problemReporting, propertyBuilder,
|
||||
propertyEncodingStrategy, unboundNominalParameters);
|
||||
builders.add(new _AddBuilder(fragment.name, propertyBuilder,
|
||||
fragment.fileUri, fragment.nameOffset));
|
||||
fragment.fileUri, fragment.nameOffset,
|
||||
inPatch: fragment.enclosingDeclaration?.isPatch ??
|
||||
fragment.enclosingCompilationUnit.isPatch));
|
||||
references.registerReference(loader, propertyBuilder);
|
||||
case SetterFragment():
|
||||
String name = fragment.name;
|
||||
@@ -1499,6 +1509,7 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
indexedContainer ??= indexedLibrary;
|
||||
|
||||
bool isAugmentation = enclosingLibraryBuilder.isAugmenting &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
fragment.modifiers.isAugment;
|
||||
|
||||
SetterReference references = new SetterReference(
|
||||
@@ -1518,7 +1529,9 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
fragment.setBuilder(problemReporting, propertyBuilder,
|
||||
propertyEncodingStrategy, unboundNominalParameters);
|
||||
builders.add(new _AddBuilder(fragment.name, propertyBuilder,
|
||||
fragment.fileUri, fragment.nameOffset));
|
||||
fragment.fileUri, fragment.nameOffset,
|
||||
inPatch: fragment.enclosingDeclaration?.isPatch ??
|
||||
fragment.enclosingCompilationUnit.isPatch));
|
||||
references.registerReference(loader, propertyBuilder);
|
||||
if (conflictingSetter) {
|
||||
propertyBuilder.isConflictingSetter = true;
|
||||
@@ -1552,6 +1565,7 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
indexedContainer ??= indexedLibrary;
|
||||
|
||||
bool isAugmentation = enclosingLibraryBuilder.isAugmenting &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
fragment.modifiers.isAugment;
|
||||
if (indexedContainer != null && !isAugmentation) {
|
||||
Name nameToLookup =
|
||||
@@ -1579,8 +1593,10 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
tearOffReference: tearOffReference);
|
||||
fragment.setBuilder(problemReporting, methodBuilder, encodingStrategy,
|
||||
unboundNominalParameters);
|
||||
builders.add(new _AddBuilder(fragment.name, methodBuilder,
|
||||
fragment.fileUri, fragment.nameOffset));
|
||||
builders.add(new _AddBuilder(
|
||||
fragment.name, methodBuilder, fragment.fileUri, fragment.nameOffset,
|
||||
inPatch: fragment.enclosingDeclaration?.isPatch ??
|
||||
fragment.enclosingCompilationUnit.isPatch));
|
||||
if (procedureReference != null) {
|
||||
loader.buildersCreatedWithReferences[procedureReference] =
|
||||
methodBuilder;
|
||||
@@ -1614,7 +1630,10 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
?.builders;
|
||||
NominalParameterCopy? nominalVariableCopy =
|
||||
NominalParameterCopy.copyTypeParameters(
|
||||
unboundNominalParameters, declarationBuilder.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
oldParameterBuilders: declarationBuilder.typeParameters,
|
||||
oldParameterFragments:
|
||||
fragment.enclosingDeclaration.typeParameters,
|
||||
kind: TypeParameterKind.extensionSynthesized,
|
||||
instanceTypeParameterAccess:
|
||||
InstanceTypeParameterAccessState.Allowed);
|
||||
@@ -1698,7 +1717,10 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
?.builders;
|
||||
NominalParameterCopy? nominalVariableCopy =
|
||||
NominalParameterCopy.copyTypeParameters(
|
||||
unboundNominalParameters, declarationBuilder.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
oldParameterBuilders: declarationBuilder.typeParameters,
|
||||
oldParameterFragments:
|
||||
fragment.enclosingDeclaration.typeParameters,
|
||||
kind: TypeParameterKind.extensionSynthesized,
|
||||
instanceTypeParameterAccess:
|
||||
InstanceTypeParameterAccessState.Allowed);
|
||||
@@ -1733,7 +1755,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
}
|
||||
fragment.builder = constructorBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, constructorBuilder,
|
||||
fragment.fileUri, fragment.fullNameOffset));
|
||||
fragment.fileUri, fragment.fullNameOffset,
|
||||
inPatch: fragment.enclosingDeclaration.isPatch));
|
||||
|
||||
// TODO(johnniwinther): There is no way to pass the tear off reference
|
||||
// here.
|
||||
@@ -1767,7 +1790,10 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
case ExtensionTypeDeclarationBuilder():
|
||||
NominalParameterCopy? nominalVariableCopy =
|
||||
NominalParameterCopy.copyTypeParameters(
|
||||
unboundNominalParameters, declarationBuilder.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
oldParameterBuilders: declarationBuilder.typeParameters,
|
||||
oldParameterFragments:
|
||||
fragment.enclosingDeclaration.typeParameters,
|
||||
kind: TypeParameterKind.extensionSynthesized,
|
||||
instanceTypeParameterAccess:
|
||||
InstanceTypeParameterAccessState.Allowed);
|
||||
@@ -1816,7 +1842,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
}
|
||||
fragment.builder = constructorBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, constructorBuilder,
|
||||
fragment.fileUri, fragment.fileOffset));
|
||||
fragment.fileUri, fragment.fileOffset,
|
||||
inPatch: fragment.enclosingDeclaration.isPatch));
|
||||
|
||||
// TODO(johnniwinther): There is no way to pass the tear off reference
|
||||
// here.
|
||||
@@ -1828,7 +1855,10 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
String name = fragment.name;
|
||||
NominalParameterCopy? nominalParameterCopy =
|
||||
NominalParameterCopy.copyTypeParameters(
|
||||
unboundNominalParameters, declarationBuilder!.typeParameters,
|
||||
unboundNominalParameters: unboundNominalParameters,
|
||||
oldParameterBuilders: declarationBuilder!.typeParameters,
|
||||
oldParameterFragments:
|
||||
fragment.enclosingDeclaration.typeParameters,
|
||||
kind: TypeParameterKind.function,
|
||||
instanceTypeParameterAccess:
|
||||
InstanceTypeParameterAccessState.Allowed);
|
||||
@@ -1903,7 +1933,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
}
|
||||
fragment.builder = factoryBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, factoryBuilder,
|
||||
fragment.fileUri, fragment.fullNameOffset));
|
||||
fragment.fileUri, fragment.fullNameOffset,
|
||||
inPatch: fragment.enclosingDeclaration.isPatch));
|
||||
// TODO(johnniwinther): There is no way to pass the tear off reference
|
||||
// here.
|
||||
if (procedureReference != null) {
|
||||
@@ -1936,7 +1967,8 @@ void _computeBuildersFromFragments(String name, List<Fragment> fragments,
|
||||
references: references);
|
||||
fragment.builder = propertyBuilder;
|
||||
builders.add(new _AddBuilder(fragment.name, propertyBuilder,
|
||||
fragment.fileUri, fragment.nameOffset));
|
||||
fragment.fileUri, fragment.nameOffset,
|
||||
inPatch: fragment.enclosingDeclaration.isPatch));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1966,6 +1998,12 @@ class LibraryNameSpaceBuilder {
|
||||
_fragments.addAll(other._fragments);
|
||||
}
|
||||
|
||||
bool _allowInjectedPublicMember(
|
||||
SourceLibraryBuilder enclosingLibraryBuilder, Builder newBuilder) {
|
||||
return enclosingLibraryBuilder.importUri.isScheme("dart") &&
|
||||
enclosingLibraryBuilder.importUri.path.startsWith("_");
|
||||
}
|
||||
|
||||
NameSpace toNameSpace({
|
||||
required SourceLibraryBuilder enclosingLibraryBuilder,
|
||||
required IndexedLibrary? indexedLibrary,
|
||||
@@ -1982,8 +2020,11 @@ class LibraryNameSpaceBuilder {
|
||||
NameSpace nameSpace = new NameSpaceImpl(
|
||||
getables: getables, setables: setables, extensions: extensions);
|
||||
|
||||
void _addBuilder(
|
||||
String name, Builder declaration, Uri fileUri, int charOffset) {
|
||||
void _addBuilder(_AddBuilder addBuilder) {
|
||||
String name = addBuilder.name;
|
||||
Builder declaration = addBuilder.declaration;
|
||||
Uri fileUri = addBuilder.fileUri;
|
||||
int charOffset = addBuilder.charOffset;
|
||||
if (declaration is SourceExtensionBuilder &&
|
||||
declaration.isUnnamedExtension) {
|
||||
extensions.add(declaration);
|
||||
@@ -2014,6 +2055,49 @@ class LibraryNameSpaceBuilder {
|
||||
|
||||
if (existing == declaration) return;
|
||||
|
||||
if (declaration.isAugment) {
|
||||
if (existing != null) {
|
||||
existing.addAugmentation(declaration);
|
||||
return;
|
||||
} else {
|
||||
if (addBuilder.inPatch) {
|
||||
Message message;
|
||||
if (declaration is SourceMemberBuilder) {
|
||||
message = addBuilder.inPatch
|
||||
? templateUnmatchedPatchLibraryMember.withArguments(name)
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
templateUnmatchedAugmentationLibraryMember
|
||||
.withArguments(name);
|
||||
} else if (declaration is SourceClassBuilder) {
|
||||
message = addBuilder.inPatch
|
||||
? templateUnmatchedPatchClass.withArguments(name)
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
templateUnmatchedAugmentationClass.withArguments(name);
|
||||
} else {
|
||||
message = addBuilder.inPatch
|
||||
? templateUnmatchedPatchDeclaration.withArguments(name)
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
templateUnmatchedAugmentationDeclaration.withArguments(name);
|
||||
}
|
||||
problemReporting.addProblem(message, charOffset, noLength, fileUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (addBuilder.inPatch &&
|
||||
!name.startsWith('_') &&
|
||||
!_allowInjectedPublicMember(enclosingLibraryBuilder, declaration)) {
|
||||
problemReporting.addProblem(
|
||||
templatePatchInjectionFailed.withArguments(
|
||||
name, enclosingLibraryBuilder.importUri),
|
||||
charOffset,
|
||||
noLength,
|
||||
fileUri);
|
||||
}
|
||||
|
||||
if (declaration.next != null &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
declaration.next != existing) {
|
||||
@@ -2034,6 +2118,7 @@ class LibraryNameSpaceBuilder {
|
||||
// output.
|
||||
extensions.add(declaration as SourceExtensionBuilder);
|
||||
} else if (declaration.isAugment) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (existing != null) {
|
||||
if (declaration.isSetter) {
|
||||
(setterAugmentations[name] ??= []).add(declaration);
|
||||
@@ -2064,8 +2149,7 @@ class LibraryNameSpaceBuilder {
|
||||
indexedLibrary: indexedLibrary,
|
||||
containerType: ContainerType.Library);
|
||||
for (_AddBuilder addBuilder in addBuilders) {
|
||||
_addBuilder(addBuilder.name, addBuilder.declaration, addBuilder.fileUri,
|
||||
addBuilder.charOffset);
|
||||
_addBuilder(addBuilder);
|
||||
}
|
||||
}
|
||||
return nameSpace;
|
||||
@@ -2146,6 +2230,7 @@ abstract class DeclarationFragmentImpl implements DeclarationFragment {
|
||||
final DeclarationBuilderScope bodyScope;
|
||||
final List<Fragment> _fragments = [];
|
||||
|
||||
@override
|
||||
final List<TypeParameterFragment>? typeParameters;
|
||||
|
||||
final NominalParameterNameSpace _nominalParameterNameSpace;
|
||||
@@ -2196,8 +2281,10 @@ class _AddBuilder {
|
||||
final Builder declaration;
|
||||
final Uri fileUri;
|
||||
final int charOffset;
|
||||
final bool inPatch;
|
||||
|
||||
_AddBuilder(this.name, this.declaration, this.fileUri, this.charOffset);
|
||||
_AddBuilder(this.name, this.declaration, this.fileUri, this.charOffset,
|
||||
{required this.inPatch});
|
||||
}
|
||||
|
||||
class DeclarationNameSpaceBuilder {
|
||||
@@ -2213,57 +2300,22 @@ class DeclarationNameSpaceBuilder {
|
||||
DeclarationNameSpaceBuilder._(
|
||||
this._name, this._nominalParameterNameSpace, this._fragments);
|
||||
|
||||
void _addBuilder(
|
||||
ProblemReporting problemReporting,
|
||||
Map<String, Builder> getables,
|
||||
Map<String, MemberBuilder> setables,
|
||||
Map<String, MemberBuilder> constructors,
|
||||
_AddBuilder addBuilder) {
|
||||
String name = addBuilder.name;
|
||||
Builder declaration = addBuilder.declaration;
|
||||
Uri fileUri = addBuilder.fileUri;
|
||||
int charOffset = addBuilder.charOffset;
|
||||
void includeBuilders(DeclarationNameSpaceBuilder other) {
|
||||
_fragments.addAll(other._fragments);
|
||||
other._fragments.clear();
|
||||
}
|
||||
|
||||
bool isConstructor = declaration is FunctionBuilder &&
|
||||
(declaration.isConstructor || declaration.isFactory);
|
||||
if (!isConstructor && name == _name) {
|
||||
problemReporting.addProblem(
|
||||
messageMemberWithSameNameAsClass, charOffset, noLength, fileUri);
|
||||
bool _allowInjectedPublicMember(
|
||||
SourceLibraryBuilder enclosingLibraryBuilder, Builder newBuilder) {
|
||||
if (enclosingLibraryBuilder.importUri.isScheme("dart") &&
|
||||
enclosingLibraryBuilder.importUri.path.startsWith("_")) {
|
||||
return true;
|
||||
}
|
||||
Map<String, Builder> members = isConstructor
|
||||
? constructors
|
||||
: (declaration.isSetter ? setables : getables);
|
||||
|
||||
Builder? existing = members[name];
|
||||
|
||||
if (existing == declaration) return;
|
||||
|
||||
if (declaration.next != null &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
declaration.next != existing) {
|
||||
unexpected(
|
||||
"${declaration.next!.fileUri}@${declaration.next!.fileOffset}",
|
||||
"${existing?.fileUri}@${existing?.fileOffset}",
|
||||
declaration.fileOffset,
|
||||
declaration.fileUri);
|
||||
if (newBuilder.isStatic) {
|
||||
return _name.startsWith('_');
|
||||
}
|
||||
declaration.next = existing;
|
||||
if (isDuplicatedDeclaration(existing, declaration)) {
|
||||
// Error reporting in [_computeBuildersFromFragments].
|
||||
// TODO(johnniwinther): Avoid the use of [isDuplicatedDeclaration].
|
||||
} else if (declaration.isAugment) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (existing != null) {
|
||||
if (declaration.isSetter) {
|
||||
// TODO(johnniwinther): Collection augment setables.
|
||||
} else {
|
||||
// TODO(johnniwinther): Collection augment getables.
|
||||
}
|
||||
} else {
|
||||
// TODO(cstefantsova): Report an error.
|
||||
}
|
||||
}
|
||||
members[name] = declaration;
|
||||
// TODO(johnniwinther): Restrict the use of injected public class members.
|
||||
return true;
|
||||
}
|
||||
|
||||
void checkTypeParameterConflict(ProblemReporting _problemReporting,
|
||||
@@ -2305,6 +2357,87 @@ class DeclarationNameSpaceBuilder {
|
||||
(fragmentsByName[fragment.name] ??= []).add(fragment);
|
||||
}
|
||||
|
||||
void _addBuilder(_AddBuilder addBuilder) {
|
||||
String name = addBuilder.name;
|
||||
Builder declaration = addBuilder.declaration;
|
||||
Uri fileUri = addBuilder.fileUri;
|
||||
int charOffset = addBuilder.charOffset;
|
||||
|
||||
bool isConstructor = declaration is FunctionBuilder &&
|
||||
(declaration.isConstructor || declaration.isFactory);
|
||||
if (!isConstructor && name == _name) {
|
||||
problemReporting.addProblem(
|
||||
messageMemberWithSameNameAsClass, charOffset, noLength, fileUri);
|
||||
}
|
||||
Map<String, Builder> members = isConstructor
|
||||
? constructors
|
||||
: (declaration.isSetter ? setables : getables);
|
||||
|
||||
Builder? existing = members[name];
|
||||
|
||||
if (existing == declaration) return;
|
||||
|
||||
if (declaration.isAugment) {
|
||||
if (existing != null) {
|
||||
existing.addAugmentation(declaration);
|
||||
return;
|
||||
} else {
|
||||
Message message;
|
||||
if (declaration is SourceMemberBuilder) {
|
||||
message = addBuilder.inPatch
|
||||
? templateUnmatchedPatchClassMember.withArguments(name)
|
||||
:
|
||||
// Coverage-ignore(suite): Not run.
|
||||
templateUnmatchedAugmentationClassMember.withArguments(name);
|
||||
} else {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
message = addBuilder.inPatch
|
||||
? templateUnmatchedPatchDeclaration.withArguments(name)
|
||||
: templateUnmatchedAugmentationDeclaration.withArguments(name);
|
||||
}
|
||||
problemReporting.addProblem(message, charOffset, noLength, fileUri);
|
||||
}
|
||||
}
|
||||
|
||||
if (addBuilder.inPatch &&
|
||||
!name.startsWith('_') &&
|
||||
!_allowInjectedPublicMember(enclosingLibraryBuilder, declaration)) {
|
||||
problemReporting.addProblem(
|
||||
templatePatchInjectionFailed.withArguments(
|
||||
name, enclosingLibraryBuilder.importUri),
|
||||
charOffset,
|
||||
noLength,
|
||||
fileUri);
|
||||
}
|
||||
|
||||
if (declaration.next != null &&
|
||||
// Coverage-ignore(suite): Not run.
|
||||
declaration.next != existing) {
|
||||
unexpected(
|
||||
"${declaration.next!.fileUri}@${declaration.next!.fileOffset}",
|
||||
"${existing?.fileUri}@${existing?.fileOffset}",
|
||||
declaration.fileOffset,
|
||||
declaration.fileUri);
|
||||
}
|
||||
declaration.next = existing;
|
||||
if (isDuplicatedDeclaration(existing, declaration)) {
|
||||
// Error reporting in [_computeBuildersFromFragments].
|
||||
// TODO(johnniwinther): Avoid the use of [isDuplicatedDeclaration].
|
||||
} else if (declaration.isAugment) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
if (existing != null) {
|
||||
if (declaration.isSetter) {
|
||||
// TODO(johnniwinther): Collection augment setables.
|
||||
} else {
|
||||
// TODO(johnniwinther): Collection augment getables.
|
||||
}
|
||||
} else {
|
||||
// TODO(cstefantsova): Report an error.
|
||||
}
|
||||
}
|
||||
members[name] = declaration;
|
||||
}
|
||||
|
||||
for (MapEntry<String, List<Fragment>> entry in fragmentsByName.entries) {
|
||||
List<_AddBuilder> addBuilders = [];
|
||||
_computeBuildersFromFragments(entry.key, entry.value,
|
||||
@@ -2321,8 +2454,7 @@ class DeclarationNameSpaceBuilder {
|
||||
containerType: containerType,
|
||||
containerName: containerName);
|
||||
for (_AddBuilder addBuilder in addBuilders) {
|
||||
_addBuilder(
|
||||
problemReporting, getables, setables, constructors, addBuilder);
|
||||
_addBuilder(addBuilder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5542,6 +5542,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
||||
isExpressionInvocation: false, isImplicitCall: false);
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
ExpressionInferenceResult visitAugmentSuperInvocation(
|
||||
AugmentSuperInvocation node, DartType typeContext) {
|
||||
Member member = node.target;
|
||||
@@ -5581,7 +5582,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
||||
return new ExpressionInferenceResult(
|
||||
result.inferredType, result.applyResult(invocation));
|
||||
} else {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
// TODO(johnniwinther): Handle augmentation of field with inferred types.
|
||||
TypeInferenceEngine.resolveInferenceNode(member, hierarchyBuilder);
|
||||
DartType receiverType = member.getterType;
|
||||
@@ -8252,6 +8252,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
||||
return new ExpressionInferenceResult(replacementType, replacement);
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
ExpressionInferenceResult visitAugmentSuperSet(
|
||||
AugmentSuperSet node, DartType typeContext) {
|
||||
Member member = node.target;
|
||||
@@ -8262,11 +8263,8 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
||||
ObjectAccessTarget target = new ObjectAccessTarget.interfaceMember(
|
||||
thisType!, member,
|
||||
hasNonObjectMemberAccess: true);
|
||||
if (target.isInstanceMember ||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
target.isObjectMember) {
|
||||
if (target.isInstanceMember || target.isObjectMember) {
|
||||
if (instrumentation != null && receiverType == const DynamicType()) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
instrumentation!.record(uriForInstrumentation, node.fileOffset,
|
||||
'target', new InstrumentationValueForMember(target.member!));
|
||||
}
|
||||
@@ -8505,6 +8503,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
||||
}
|
||||
}
|
||||
|
||||
// Coverage-ignore(suite): Not run.
|
||||
ExpressionInferenceResult visitAugmentSuperGet(
|
||||
AugmentSuperGet node, DartType typeContext) {
|
||||
Member member = node.target;
|
||||
|
||||
@@ -943,6 +943,8 @@ PatchClassTypeParametersMismatch/analyzerCode: Fail
|
||||
PatchClassTypeParametersMismatch/example: Fail
|
||||
PatchDeclarationMismatch/analyzerCode: Fail
|
||||
PatchDeclarationMismatch/example: Fail
|
||||
PatchExtensionTypeParametersMismatch/analyzerCode: Fail
|
||||
PatchExtensionTypeParametersMismatch/example: Fail
|
||||
PatchInjectionFailed/analyzerCode: Fail
|
||||
PatchInjectionFailed/example: Fail
|
||||
PatchNonExternal/analyzerCode: Fail
|
||||
|
||||
@@ -4168,6 +4168,13 @@ PatchClassOrigin:
|
||||
problemMessage: "This is the origin class."
|
||||
severity: CONTEXT
|
||||
|
||||
PatchExtensionTypeParametersMismatch:
|
||||
problemMessage: "A patch extension must have the same number of type variables as its origin extension."
|
||||
|
||||
PatchExtensionOrigin:
|
||||
problemMessage: "This is the origin extension."
|
||||
severity: CONTEXT
|
||||
|
||||
PatchDeclarationMismatch:
|
||||
problemMessage: "This patch doesn't match origin declaration."
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/base/incremental_compiler.dart": (
|
||||
hitCount: 828,
|
||||
hitCount: 850,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -185,7 +185,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/base/modifiers.dart": (
|
||||
hitCount: 130,
|
||||
hitCount: 128,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -210,7 +210,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/base/scope.dart": (
|
||||
hitCount: 671,
|
||||
hitCount: 455,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -255,7 +255,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/builder/class_builder.dart": (
|
||||
hitCount: 137,
|
||||
hitCount: 135,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -265,7 +265,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/builder/declaration_builder.dart": (
|
||||
hitCount: 28,
|
||||
hitCount: 26,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -370,7 +370,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/builder/synthesized_type_builder.dart": (
|
||||
hitCount: 124,
|
||||
hitCount: 122,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -465,12 +465,12 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/class.dart": (
|
||||
hitCount: 6,
|
||||
hitCount: 11,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/class/declaration.dart": (
|
||||
hitCount: 171,
|
||||
hitCount: 168,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -480,7 +480,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/constructor/declaration.dart": (
|
||||
hitCount: 315,
|
||||
hitCount: 312,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -490,7 +490,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/enum.dart": (
|
||||
hitCount: 10,
|
||||
hitCount: 13,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -500,12 +500,12 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/extension.dart": (
|
||||
hitCount: 13,
|
||||
hitCount: 18,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/extension_type.dart": (
|
||||
hitCount: 10,
|
||||
hitCount: 13,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -535,17 +535,17 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/getter.dart": (
|
||||
hitCount: 537,
|
||||
hitCount: 530,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/method.dart": (
|
||||
hitCount: 783,
|
||||
hitCount: 781,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/mixin.dart": (
|
||||
hitCount: 6,
|
||||
hitCount: 9,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -560,7 +560,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/setter.dart": (
|
||||
hitCount: 557,
|
||||
hitCount: 550,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -575,12 +575,12 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/fragment/util.dart": (
|
||||
hitCount: 117,
|
||||
hitCount: 127,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/kernel/augmentation_lowering.dart": (
|
||||
hitCount: 4,
|
||||
hitCount: 0,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -590,12 +590,12 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/kernel/body_builder.dart": (
|
||||
hitCount: 7216,
|
||||
hitCount: 7205,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/kernel/body_builder_context.dart": (
|
||||
hitCount: 289,
|
||||
hitCount: 281,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -650,7 +650,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/kernel/expression_generator.dart": (
|
||||
hitCount: 2525,
|
||||
hitCount: 2480,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -720,7 +720,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/kernel/internal_ast.dart": (
|
||||
hitCount: 571,
|
||||
hitCount: 551,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -740,7 +740,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/kernel/kernel_target.dart": (
|
||||
hitCount: 1043,
|
||||
hitCount: 1044,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -810,17 +810,17 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/builder_factory.dart": (
|
||||
hitCount: 63,
|
||||
hitCount: 69,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/class_declaration.dart": (
|
||||
hitCount: 104,
|
||||
hitCount: 110,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/diet_listener.dart": (
|
||||
hitCount: 647,
|
||||
hitCount: 646,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -840,7 +840,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/outline_builder.dart": (
|
||||
hitCount: 2114,
|
||||
hitCount: 2109,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -850,7 +850,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_builder_factory.dart": (
|
||||
hitCount: 1158,
|
||||
hitCount: 1190,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -860,17 +860,17 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_class_builder.dart": (
|
||||
hitCount: 1402,
|
||||
hitCount: 1399,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_compilation_unit.dart": (
|
||||
hitCount: 658,
|
||||
hitCount: 674,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_constructor_builder.dart": (
|
||||
hitCount: 694,
|
||||
hitCount: 699,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -880,48 +880,48 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_extension_builder.dart": (
|
||||
hitCount: 134,
|
||||
hitCount: 159,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_extension_type_declaration_builder.dart":
|
||||
(
|
||||
hitCount: 511,
|
||||
hitCount: 514,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_factory_builder.dart": (
|
||||
hitCount: 994,
|
||||
hitCount: 1011,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_function_builder.dart": (
|
||||
hitCount: 47,
|
||||
hitCount: 46,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_library_builder.dart": (
|
||||
hitCount: 1238,
|
||||
hitCount: 1120,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_loader.dart": (
|
||||
hitCount: 1844,
|
||||
hitCount: 1819,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_member_builder.dart": (
|
||||
hitCount: 14,
|
||||
hitCount: 10,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_method_builder.dart": (
|
||||
hitCount: 279,
|
||||
hitCount: 229,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/source_property_builder.dart": (
|
||||
hitCount: 767,
|
||||
hitCount: 678,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -941,7 +941,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/source/type_parameter_scope_builder.dart": (
|
||||
hitCount: 1397,
|
||||
hitCount: 1496,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
@@ -976,7 +976,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
|
||||
),
|
||||
// 100.0%.
|
||||
"package:front_end/src/type_inference/inference_visitor.dart": (
|
||||
hitCount: 8283,
|
||||
hitCount: 8178,
|
||||
missCount: 0,
|
||||
),
|
||||
// 100.0%.
|
||||
|
||||
@@ -1472,6 +1472,7 @@ red
|
||||
redeclared
|
||||
redefine
|
||||
redirectee
|
||||
redirections
|
||||
redirector
|
||||
redo
|
||||
reevaluation
|
||||
|
||||
@@ -8,4 +8,4 @@ import 'part_with_import_lib.dart';
|
||||
|
||||
method2() {
|
||||
foo(); // Ok
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
// 0.method2();
|
||||
// ^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:test" as test;
|
||||
|
||||
@@ -14,21 +6,10 @@ import "dart:test";
|
||||
|
||||
static method test() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
invalid-expression "pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
0.method2();
|
||||
^^^^^^^" in 0{<unresolved>}.method2();
|
||||
test::IntExtension|method2(0);
|
||||
}
|
||||
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
// 0.method2();
|
||||
// ^^^^^^^
|
||||
//
|
||||
import self as test;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
@@ -37,30 +18,47 @@ import "dart:_internal";
|
||||
|
||||
@#C1
|
||||
extension IntExtension on core::int {
|
||||
method method2 = test::IntExtension|method2;
|
||||
method tearoff method2 = test::IntExtension|get#method2;
|
||||
method method1 = test::IntExtension|method1;
|
||||
method tearoff method1 = test::IntExtension|get#method1;
|
||||
method method2 = test::IntExtension|method2;
|
||||
method tearoff method2 = test::IntExtension|get#method2;
|
||||
}
|
||||
@#C1
|
||||
extension GenericExtension<T extends core::Object? = dynamic> on T% {
|
||||
method method3 = test::GenericExtension|method3;
|
||||
method tearoff method3 = test::GenericExtension|get#method3;
|
||||
method method4 = test::GenericExtension|method4;
|
||||
method tearoff method4 = test::GenericExtension|get#method4;
|
||||
}
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method1(lowered final core::int #this) → core::int
|
||||
return 42;
|
||||
static extension-member method IntExtension|get#method1(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::IntExtension|method1(#this);
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|method3<T extends core::Object? = dynamic>(lowered final test::GenericExtension|method3::T% #this) → core::int
|
||||
return 42;
|
||||
static extension-member method GenericExtension|get#method3<T extends core::Object? = dynamic>(lowered final test::GenericExtension|get#method3::T% #this) → () → core::int
|
||||
return () → core::int => test::GenericExtension|method3<test::GenericExtension|get#method3::T%>(#this);
|
||||
static method method1() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
invalid-expression "pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
0.method2();
|
||||
^^^^^^^" in 0{<unresolved>}.method2();
|
||||
test::IntExtension|method2(0);
|
||||
test::GenericExtension|method3<core::int>(0);
|
||||
test::GenericExtension|method4<core::int>(0);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method2(lowered final core::int #this) → core::int
|
||||
return 43;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|get#method2(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::IntExtension|method2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|method4<T extends core::Object? = dynamic>(lowered final test::GenericExtension|method4::T% #this) → core::int
|
||||
return 43;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|get#method4<T extends core::Object? = dynamic>(lowered final test::GenericExtension|get#method4::T% #this) → () → core::int
|
||||
return () → core::int => test::GenericExtension|method4<test::GenericExtension|get#method4::T%>(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ _method2() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
test::IntExtension|method2(0);
|
||||
test::GenericExtension|method3<core::int>(0);
|
||||
test::GenericExtension|method4<core::int>(0);
|
||||
}
|
||||
|
||||
constants {
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
// 0.method2();
|
||||
// ^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:test" as test;
|
||||
|
||||
@@ -14,21 +6,10 @@ import "dart:test";
|
||||
|
||||
static method test() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
invalid-expression "pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
0.method2();
|
||||
^^^^^^^" in 0{<unresolved>}.method2();
|
||||
test::IntExtension|method2(0);
|
||||
}
|
||||
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
// 0.method2();
|
||||
// ^^^^^^^
|
||||
//
|
||||
import self as test;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
@@ -37,30 +18,47 @@ import "dart:_internal";
|
||||
|
||||
@#C1
|
||||
extension IntExtension on core::int {
|
||||
method method2 = test::IntExtension|method2;
|
||||
method tearoff method2 = test::IntExtension|get#method2;
|
||||
method method1 = test::IntExtension|method1;
|
||||
method tearoff method1 = test::IntExtension|get#method1;
|
||||
method method2 = test::IntExtension|method2;
|
||||
method tearoff method2 = test::IntExtension|get#method2;
|
||||
}
|
||||
@#C1
|
||||
extension GenericExtension<T extends core::Object? = dynamic> on T% {
|
||||
method method3 = test::GenericExtension|method3;
|
||||
method tearoff method3 = test::GenericExtension|get#method3;
|
||||
method method4 = test::GenericExtension|method4;
|
||||
method tearoff method4 = test::GenericExtension|get#method4;
|
||||
}
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method1(lowered final core::int #this) → core::int
|
||||
return 42;
|
||||
static extension-member method IntExtension|get#method1(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::IntExtension|method1(#this);
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|method3<T extends core::Object? = dynamic>(lowered final test::GenericExtension|method3::T% #this) → core::int
|
||||
return 42;
|
||||
static extension-member method GenericExtension|get#method3<T extends core::Object? = dynamic>(lowered final test::GenericExtension|get#method3::T% #this) → () → core::int
|
||||
return () → core::int => test::GenericExtension|method3<test::GenericExtension|get#method3::T%>(#this);
|
||||
static method method1() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
invalid-expression "pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
0.method2();
|
||||
^^^^^^^" in 0{<unresolved>}.method2();
|
||||
test::IntExtension|method2(0);
|
||||
test::GenericExtension|method3<core::int>(0);
|
||||
test::GenericExtension|method4<core::int>(0);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method2(lowered final core::int #this) → core::int
|
||||
return 43;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|get#method2(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::IntExtension|method2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|method4<T extends core::Object? = dynamic>(lowered final test::GenericExtension|method4::T% #this) → core::int
|
||||
return 43;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|get#method4<T extends core::Object? = dynamic>(lowered final test::GenericExtension|get#method4::T% #this) → () → core::int
|
||||
return () → core::int => test::GenericExtension|method4<test::GenericExtension|get#method4::T%>(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ _method2() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
test::IntExtension|method2(0);
|
||||
test::GenericExtension|method3<core::int>(0);
|
||||
test::GenericExtension|method4<core::int>(0);
|
||||
}
|
||||
|
||||
constants {
|
||||
|
||||
@@ -15,26 +15,43 @@ import "dart:_internal";
|
||||
|
||||
@_in::patch
|
||||
extension IntExtension on core::int {
|
||||
method method2 = self2::IntExtension|method2;
|
||||
method tearoff method2 = self2::IntExtension|get#method2;
|
||||
method method1 = self2::IntExtension|method1;
|
||||
method tearoff method1 = self2::IntExtension|get#method1;
|
||||
method method2 = self2::IntExtension|method2;
|
||||
method tearoff method2 = self2::IntExtension|get#method2;
|
||||
}
|
||||
@_in::patch
|
||||
extension GenericExtension<T extends core::Object? = dynamic> on T% {
|
||||
method method3 = self2::GenericExtension|method3;
|
||||
method tearoff method3 = self2::GenericExtension|get#method3;
|
||||
method method4 = self2::GenericExtension|method4;
|
||||
method tearoff method4 = self2::GenericExtension|get#method4;
|
||||
}
|
||||
@_in::patch
|
||||
external static extension-member method IntExtension|method1(lowered final core::int #this) → core::int;
|
||||
static extension-member method IntExtension|get#method1(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => self2::IntExtension|method1(#this);
|
||||
@_in::patch
|
||||
external static extension-member method GenericExtension|method3<T extends core::Object? = dynamic>(lowered final self2::GenericExtension|method3::T% #this) → core::int;
|
||||
static extension-member method GenericExtension|get#method3<T extends core::Object? = dynamic>(lowered final self2::GenericExtension|get#method3::T% #this) → () → core::int
|
||||
return () → core::int => self2::GenericExtension|method3<self2::GenericExtension|get#method3::T%>(#this);
|
||||
static method method1() → dynamic
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method2(lowered final core::int #this) → core::int
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|get#method2(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => self2::IntExtension|method2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|method4<T extends core::Object? = dynamic>(lowered final self2::GenericExtension|method4::T% #this) → core::int
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|get#method4<T extends core::Object? = dynamic>(lowered final self2::GenericExtension|get#method4::T% #this) → () → core::int
|
||||
return () → core::int => self2::GenericExtension|method4<self2::GenericExtension|get#method4::T%>(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ _method2() → dynamic
|
||||
;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:9:2 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:12:1 -> InstanceConstant(const _Patch{})
|
||||
Extra constant evaluation: evaluated: 8, effectively constant: 2
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:5:63 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:7:5 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:6:26 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:7:51 -> InstanceConstant(const _Patch{})
|
||||
Extra constant evaluation: evaluated: 16, effectively constant: 4
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
// 0.method2();
|
||||
// ^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:test" as test;
|
||||
|
||||
@@ -14,21 +6,10 @@ import "dart:test";
|
||||
|
||||
static method test() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
invalid-expression "pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
0.method2();
|
||||
^^^^^^^" in 0{<unresolved>}.method2();
|
||||
test::IntExtension|method2(0);
|
||||
}
|
||||
|
||||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
// 0.method2();
|
||||
// ^^^^^^^
|
||||
//
|
||||
import self as test;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
@@ -37,30 +18,47 @@ import "dart:_internal";
|
||||
|
||||
@#C1
|
||||
extension IntExtension on core::int {
|
||||
method method2 = test::IntExtension|method2;
|
||||
method tearoff method2 = test::IntExtension|get#method2;
|
||||
method method1 = test::IntExtension|method1;
|
||||
method tearoff method1 = test::IntExtension|get#method1;
|
||||
method method2 = test::IntExtension|method2;
|
||||
method tearoff method2 = test::IntExtension|get#method2;
|
||||
}
|
||||
@#C1
|
||||
extension GenericExtension<T extends core::Object? = dynamic> on T% {
|
||||
method method3 = test::GenericExtension|method3;
|
||||
method tearoff method3 = test::GenericExtension|get#method3;
|
||||
method method4 = test::GenericExtension|method4;
|
||||
method tearoff method4 = test::GenericExtension|get#method4;
|
||||
}
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method1(lowered final core::int #this) → core::int
|
||||
return 42;
|
||||
static extension-member method IntExtension|get#method1(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::IntExtension|method1(#this);
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|method3<T extends core::Object? = dynamic>(lowered final test::GenericExtension|method3::T% #this) → core::int
|
||||
return 42;
|
||||
static extension-member method GenericExtension|get#method3<T extends core::Object? = dynamic>(lowered final test::GenericExtension|get#method3::T% #this) → () → core::int
|
||||
return () → core::int => test::GenericExtension|method3<test::GenericExtension|get#method3::T%>(#this);
|
||||
static method method1() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
invalid-expression "pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named 'method2'.
|
||||
0.method2();
|
||||
^^^^^^^" in 0{<unresolved>}.method2();
|
||||
test::IntExtension|method2(0);
|
||||
test::GenericExtension|method3<core::int>(0);
|
||||
test::GenericExtension|method4<core::int>(0);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method2(lowered final core::int #this) → core::int
|
||||
return 43;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|get#method2(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::IntExtension|method2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|method4<T extends core::Object? = dynamic>(lowered final test::GenericExtension|method4::T% #this) → core::int
|
||||
return 43;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ GenericExtension|get#method4<T extends core::Object? = dynamic>(lowered final test::GenericExtension|get#method4::T% #this) → () → core::int
|
||||
return () → core::int => test::GenericExtension|method4<test::GenericExtension|get#method4::T%>(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ _method2() → dynamic {
|
||||
test::IntExtension|method1(0);
|
||||
test::IntExtension|method2(0);
|
||||
test::GenericExtension|method3<core::int>(0);
|
||||
test::GenericExtension|method4<core::int>(0);
|
||||
}
|
||||
|
||||
constants {
|
||||
|
||||
@@ -2,11 +2,46 @@
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long long long long long long long long long long long long long long long
|
||||
// long comment to make offsets in `origin_lib.dart` out of range in
|
||||
// `patch_lib.dart`.
|
||||
|
||||
extension IntExtension on int {
|
||||
external int method1();
|
||||
}
|
||||
|
||||
extension GenericExtension<T> on T {
|
||||
external int method3();
|
||||
}
|
||||
|
||||
method1() {
|
||||
0.method1();
|
||||
0.method2();
|
||||
0.method3();
|
||||
0.method4();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,17 @@ extension IntExtension on int {
|
||||
int method2() => 43;
|
||||
}
|
||||
|
||||
@patch
|
||||
extension GenericExtension<T> on T {
|
||||
@patch
|
||||
int method3() => 42;
|
||||
|
||||
int method4() => 43;
|
||||
}
|
||||
|
||||
_method2() {
|
||||
0.method1();
|
||||
0.method2();
|
||||
0.method3();
|
||||
0.method4();
|
||||
}
|
||||
|
||||
@@ -38,15 +38,6 @@ import "dart:_internal";
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
class Class extends core::Object /*hasConstConstructor*/ {
|
||||
final field core::bool defaultValue /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → test::Class
|
||||
: test::Class::defaultValue = false, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → test::Class
|
||||
: this test::Class::_private()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → test::Class
|
||||
: this test::Class::_privateInjected()
|
||||
;
|
||||
@#C3
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ generative({core::bool defaultValue = #C1}) → test::Class
|
||||
: test::Class::defaultValue = defaultValue, super core::Object::•()
|
||||
@@ -59,11 +50,20 @@ class Class extends core::Object /*hasConstConstructor*/ {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _private() → test::Class
|
||||
: test::Class::defaultValue = true, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → test::Class
|
||||
: test::Class::defaultValue = false, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → test::Class
|
||||
: this test::Class::_private()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → test::Class
|
||||
: this test::Class::_privateInjected()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
class Class2 extends core::Object {
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
field core::int field;
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@#C3
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ •(core::int field) → test::Class2
|
||||
: test::Class2::field = field, test::Class2::injectedField = field, super core::Object::•()
|
||||
|
||||
@@ -38,15 +38,6 @@ import "dart:_internal";
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
class Class extends core::Object /*hasConstConstructor*/ {
|
||||
final field core::bool defaultValue /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → test::Class
|
||||
: test::Class::defaultValue = false, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → test::Class
|
||||
: this test::Class::_private()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → test::Class
|
||||
: this test::Class::_privateInjected()
|
||||
;
|
||||
@#C3
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ generative({core::bool defaultValue = #C1}) → test::Class
|
||||
: test::Class::defaultValue = defaultValue, super core::Object::•()
|
||||
@@ -59,11 +50,20 @@ class Class extends core::Object /*hasConstConstructor*/ {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _private() → test::Class
|
||||
: test::Class::defaultValue = true, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → test::Class
|
||||
: test::Class::defaultValue = false, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → test::Class
|
||||
: this test::Class::_private()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → test::Class
|
||||
: this test::Class::_privateInjected()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
class Class2 extends core::Object {
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
field core::int field;
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@#C3
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ •(core::int field) → test::Class2
|
||||
: test::Class2::field = field, test::Class2::injectedField = field, super core::Object::•()
|
||||
|
||||
@@ -18,12 +18,6 @@ import "dart:_internal";
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class Class extends core::Object /*hasConstConstructor*/ {
|
||||
final field core::bool defaultValue /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → self2::Class
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → self2::Class
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → self2::Class
|
||||
;
|
||||
@_in::patch
|
||||
external constructor generative({core::bool defaultValue = true}) → self2::Class;
|
||||
@_in::patch
|
||||
@@ -32,11 +26,17 @@ class Class extends core::Object /*hasConstConstructor*/ {
|
||||
;
|
||||
@_in::patch
|
||||
external constructor _private() → self2::Class;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → self2::Class
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → self2::Class
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → self2::Class
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class Class2 extends core::Object {
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
field core::int field;
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@_in::patch
|
||||
external constructor •(core::int field) → self2::Class2;
|
||||
}
|
||||
|
||||
+10
-10
@@ -38,15 +38,6 @@ import "dart:_internal";
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
class Class extends core::Object /*hasConstConstructor*/ {
|
||||
final field core::bool defaultValue /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → test::Class
|
||||
: test::Class::defaultValue = false, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → test::Class
|
||||
: this test::Class::_private()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → test::Class
|
||||
: this test::Class::_privateInjected()
|
||||
;
|
||||
@#C3
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ generative({core::bool defaultValue = #C1}) → test::Class
|
||||
: test::Class::defaultValue = defaultValue, super core::Object::•()
|
||||
@@ -59,11 +50,20 @@ class Class extends core::Object /*hasConstConstructor*/ {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _private() → test::Class
|
||||
: test::Class::defaultValue = true, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _privateInjected() → test::Class
|
||||
: test::Class::defaultValue = false, super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirect() → test::Class
|
||||
: this test::Class::_private()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ redirectInjected() → test::Class
|
||||
: this test::Class::_privateInjected()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
class Class2 extends core::Object {
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
field core::int field;
|
||||
final field core::int injectedField /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@#C3
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ •(core::int field) → test::Class2
|
||||
: test::Class2::field = field, test::Class2::injectedField = field, super core::Object::•()
|
||||
|
||||
@@ -19,33 +19,85 @@ library;
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:8:7: Error: Can't inject public 'InjectedClass' into 'dart:test'.
|
||||
// Make 'InjectedClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class InjectedClass {}
|
||||
// class InjectedClass {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:10:1: Error: Can't inject public 'injectedMethod' into 'dart:test'.
|
||||
// Make 'injectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// injectedMethod() {}
|
||||
// injectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:15:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:21:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
import self as test;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::InjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {}
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class _PrivateClass extends core::Object {
|
||||
synthetic constructor •() → test::_PrivateClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {}
|
||||
}
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::InjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _PrivateInjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::_PrivateInjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
method publicMethod() → dynamic {}
|
||||
}
|
||||
@#C1
|
||||
extension Extension on core::int {
|
||||
method injectedMethod = test::Extension|injectedMethod;
|
||||
method tearoff injectedMethod = test::Extension|get#injectedMethod;
|
||||
static method staticInjectedMethod = test::Extension|staticInjectedMethod;
|
||||
}
|
||||
@#C1
|
||||
extension _PrivateExtension on core::int {
|
||||
method injectedMethod = test::_PrivateExtension|injectedMethod;
|
||||
method tearoff injectedMethod = test::_PrivateExtension|get#injectedMethod;
|
||||
static method staticInjectedMethod = test::_PrivateExtension|staticInjectedMethod;
|
||||
}
|
||||
extension _PrivateInjectedExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
method publicMethod = test::_PrivateInjectedExtension|publicMethod;
|
||||
method tearoff publicMethod = test::_PrivateInjectedExtension|get#publicMethod;
|
||||
}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|injectedMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::Extension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|staticInjectedMethod() → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|publicMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|get#publicMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::_PrivateInjectedExtension|publicMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|injectedMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::_PrivateExtension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|staticInjectedMethod() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -19,33 +19,85 @@ library;
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:8:7: Error: Can't inject public 'InjectedClass' into 'dart:test'.
|
||||
// Make 'InjectedClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class InjectedClass {}
|
||||
// class InjectedClass {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:10:1: Error: Can't inject public 'injectedMethod' into 'dart:test'.
|
||||
// Make 'injectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// injectedMethod() {}
|
||||
// injectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:15:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:21:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
import self as test;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::InjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {}
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class _PrivateClass extends core::Object {
|
||||
synthetic constructor •() → test::_PrivateClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {}
|
||||
}
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::InjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _PrivateInjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::_PrivateInjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
method publicMethod() → dynamic {}
|
||||
}
|
||||
@#C1
|
||||
extension Extension on core::int {
|
||||
method injectedMethod = test::Extension|injectedMethod;
|
||||
method tearoff injectedMethod = test::Extension|get#injectedMethod;
|
||||
static method staticInjectedMethod = test::Extension|staticInjectedMethod;
|
||||
}
|
||||
@#C1
|
||||
extension _PrivateExtension on core::int {
|
||||
method injectedMethod = test::_PrivateExtension|injectedMethod;
|
||||
method tearoff injectedMethod = test::_PrivateExtension|get#injectedMethod;
|
||||
static method staticInjectedMethod = test::_PrivateExtension|staticInjectedMethod;
|
||||
}
|
||||
extension _PrivateInjectedExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
method publicMethod = test::_PrivateInjectedExtension|publicMethod;
|
||||
method tearoff publicMethod = test::_PrivateInjectedExtension|get#publicMethod;
|
||||
}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|injectedMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::Extension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|staticInjectedMethod() → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|publicMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|get#publicMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::_PrivateInjectedExtension|publicMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|injectedMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::_PrivateExtension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|staticInjectedMethod() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -14,35 +14,97 @@ library;
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:8:7: Error: Can't inject public 'InjectedClass' into 'dart:test'.
|
||||
// Make 'InjectedClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class InjectedClass {}
|
||||
// class InjectedClass {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:10:1: Error: Can't inject public 'injectedMethod' into 'dart:test'.
|
||||
// Make 'injectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// injectedMethod() {}
|
||||
// injectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:15:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:21:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::InjectedClass
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self2::Class
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic
|
||||
;
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class _PrivateClass extends core::Object {
|
||||
synthetic constructor •() → self2::_PrivateClass
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic
|
||||
;
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic
|
||||
;
|
||||
}
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::InjectedClass
|
||||
;
|
||||
}
|
||||
class _PrivateInjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::_PrivateInjectedClass
|
||||
;
|
||||
method publicMethod() → dynamic
|
||||
;
|
||||
}
|
||||
@_in::patch
|
||||
extension Extension on core::int {
|
||||
method injectedMethod = self2::Extension|injectedMethod;
|
||||
method tearoff injectedMethod = self2::Extension|get#injectedMethod;
|
||||
static method staticInjectedMethod = self2::Extension|staticInjectedMethod;
|
||||
}
|
||||
@_in::patch
|
||||
extension _PrivateExtension on core::int {
|
||||
method injectedMethod = self2::_PrivateExtension|injectedMethod;
|
||||
method tearoff injectedMethod = self2::_PrivateExtension|get#injectedMethod;
|
||||
static method staticInjectedMethod = self2::_PrivateExtension|staticInjectedMethod;
|
||||
}
|
||||
extension _PrivateInjectedExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
method publicMethod = self2::_PrivateInjectedExtension|publicMethod;
|
||||
method tearoff publicMethod = self2::_PrivateInjectedExtension|get#publicMethod;
|
||||
}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|injectedMethod(lowered final core::int #this) → dynamic
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => self2::Extension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|staticInjectedMethod() → dynamic
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|publicMethod(lowered final core::int #this) → dynamic
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|get#publicMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => self2::_PrivateInjectedExtension|publicMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|injectedMethod(lowered final core::int #this) → dynamic
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => self2::_PrivateExtension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|staticInjectedMethod() → dynamic
|
||||
;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:12:1 -> InstanceConstant(const _Patch{})
|
||||
Extra constant evaluation: evaluated: 1, effectively constant: 1
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:32:1 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ (unknown position in org-dartlang-testcase:///origin_lib.dart) -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ (unknown position in org-dartlang-testcase:///origin_lib.dart) -> InstanceConstant(const _Patch{})
|
||||
Extra constant evaluation: evaluated: 13, effectively constant: 4
|
||||
|
||||
@@ -19,33 +19,85 @@ library;
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:8:7: Error: Can't inject public 'InjectedClass' into 'dart:test'.
|
||||
// Make 'InjectedClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class InjectedClass {}
|
||||
// class InjectedClass {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:10:1: Error: Can't inject public 'injectedMethod' into 'dart:test'.
|
||||
// Make 'injectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// injectedMethod() {}
|
||||
// injectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:15:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/inject_public/patch_lib.dart:21:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'.
|
||||
// Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// static staticInjectedMethod() {} // Error
|
||||
// ^
|
||||
//
|
||||
import self as test;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::InjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {}
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class _PrivateClass extends core::Object {
|
||||
synthetic constructor •() → test::_PrivateClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {}
|
||||
}
|
||||
class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::InjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _PrivateInjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → test::_PrivateInjectedClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
method publicMethod() → dynamic {}
|
||||
}
|
||||
@#C1
|
||||
extension Extension on core::int {
|
||||
method injectedMethod = test::Extension|injectedMethod;
|
||||
method tearoff injectedMethod = test::Extension|get#injectedMethod;
|
||||
static method staticInjectedMethod = test::Extension|staticInjectedMethod;
|
||||
}
|
||||
@#C1
|
||||
extension _PrivateExtension on core::int {
|
||||
method injectedMethod = test::_PrivateExtension|injectedMethod;
|
||||
method tearoff injectedMethod = test::_PrivateExtension|get#injectedMethod;
|
||||
static method staticInjectedMethod = test::_PrivateExtension|staticInjectedMethod;
|
||||
}
|
||||
extension _PrivateInjectedExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
method publicMethod = test::_PrivateInjectedExtension|publicMethod;
|
||||
method tearoff publicMethod = test::_PrivateInjectedExtension|get#publicMethod;
|
||||
}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|injectedMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::Extension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|staticInjectedMethod() → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|publicMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|get#publicMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::_PrivateInjectedExtension|publicMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|injectedMethod(lowered final core::int #this) → dynamic {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|get#injectedMethod(lowered final core::int #this) → () → dynamic
|
||||
return () → dynamic => test::_PrivateExtension|injectedMethod(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|staticInjectedMethod() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -3,3 +3,9 @@
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class Class {}
|
||||
|
||||
extension Extension on int {}
|
||||
|
||||
class _PrivateClass {}
|
||||
|
||||
extension _PrivateExtension on int {}
|
||||
|
||||
@@ -5,11 +5,38 @@
|
||||
// ignore: import_internal_library
|
||||
import 'dart:_internal';
|
||||
|
||||
class InjectedClass {}
|
||||
class InjectedClass {} // Error
|
||||
|
||||
injectedMethod() {}
|
||||
injectedMethod() {} // Error
|
||||
|
||||
@patch
|
||||
class Class {
|
||||
injectedMethod() {}
|
||||
injectedMethod() {} // Error
|
||||
static staticInjectedMethod() {} // Error
|
||||
}
|
||||
|
||||
@patch
|
||||
extension Extension on int {
|
||||
injectedMethod() {} // Error
|
||||
static staticInjectedMethod() {} // Error
|
||||
}
|
||||
|
||||
class _PrivateInjectedClass /* Ok */ {
|
||||
publicMethod() {} // Ok
|
||||
}
|
||||
|
||||
extension _PrivateInjectedExtension on int /* Ok */ {
|
||||
publicMethod() {} // Ok
|
||||
}
|
||||
|
||||
@patch
|
||||
class _PrivateClass {
|
||||
injectedMethod() {} // Error
|
||||
static staticInjectedMethod() {} // Ok
|
||||
}
|
||||
|
||||
@patch
|
||||
extension _PrivateExtension on int {
|
||||
injectedMethod() {} // Error
|
||||
static staticInjectedMethod() {} // Ok
|
||||
}
|
||||
|
||||
@@ -7,17 +7,11 @@ static method main() → dynamic {}
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C4
|
||||
class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
@@ -25,6 +19,12 @@ class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
static factory /* from org-dartlang-testcase:///patch_lib.dart */ •<T extends core::Object? = dynamic>(core::int foo) → self2::Array<self2::Array::•::T%> /* redirection-target: self2::_ArraySize::•<self2::Array::•::T%>*/
|
||||
return new self2::_ArraySize::•<self2::Array::•::T%>(foo);
|
||||
}
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -7,17 +7,11 @@ static method main() → dynamic {}
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C4
|
||||
class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
@@ -25,6 +19,12 @@ class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
static factory /* from org-dartlang-testcase:///patch_lib.dart */ •<T extends core::Object? = dynamic>(core::int foo) → self2::Array<self2::Array::•::T%> /* redirection-target: self2::_ArraySize::•<self2::Array::•::T%>*/
|
||||
return new self2::_ArraySize::•<self2::Array::•::T%>(foo);
|
||||
}
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -8,17 +8,11 @@ static method main() → dynamic
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ const core::pragma::_("vm:entry-point")
|
||||
class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
@@ -26,6 +20,12 @@ class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
static factory /* from org-dartlang-testcase:///patch_lib.dart */ •<T extends core::Object? = dynamic>(core::int foo) → self2::Array<self2::Array::•::T%> /* redirection-target: self2::_ArraySize::•<self2::Array::•::T%>*/
|
||||
return new self2::_ArraySize::•<self2::Array::•::T%>(foo);
|
||||
}
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
|
||||
@@ -7,17 +7,11 @@ static method main() → dynamic {}
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C4
|
||||
class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
@@ -25,6 +19,12 @@ class Array<T extends core::Object? = dynamic> extends core::Object {
|
||||
static factory /* from org-dartlang-testcase:///patch_lib.dart */ •<T extends core::Object? = dynamic>(core::int foo) → self2::Array<self2::Array::•::T%> /* redirection-target: self2::_ArraySize::•<self2::Array::•::T%>*/
|
||||
return new self2::_ArraySize::•<self2::Array::•::T%>(foo);
|
||||
}
|
||||
class _ArraySize<T extends core::Object? = dynamic> extends core::Object implements self2::Array<self2::_ArraySize::T%> /*hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
final field core::int foo;
|
||||
const constructor •(core::int foo) → self2::_ArraySize<self2::_ArraySize::T%>
|
||||
: self2::_ArraySize::foo = foo, super core::Object::•()
|
||||
;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -20,9 +20,6 @@ import "dart:_internal";
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = #C2}) → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ patched() → test::Class
|
||||
: this test::Class::_internal()
|
||||
@@ -30,14 +27,14 @@ class Class extends core::Object {
|
||||
constructor unpatched() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = #C2}) → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class Mixin extends core::Object /*isMixinDeclaration*/ {
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class SubClass extends test::_SubClass&Class&Mixin {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::_internal(value: true)
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ patched() → test::SubClass
|
||||
: this test::SubClass::_internal()
|
||||
@@ -45,6 +42,9 @@ class SubClass extends test::_SubClass&Class&Mixin {
|
||||
constructor unpatched() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::unpatched()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::_internal(value: true)
|
||||
;
|
||||
}
|
||||
abstract class _SubClass&Class&Mixin = test::Class with test::Mixin /*isAnonymousMixin*/ {
|
||||
synthetic constructor patched() → test::_SubClass&Class&Mixin
|
||||
|
||||
@@ -20,9 +20,6 @@ import "dart:_internal";
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = #C2}) → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ patched() → test::Class
|
||||
: this test::Class::_internal()
|
||||
@@ -30,14 +27,14 @@ class Class extends core::Object {
|
||||
constructor unpatched() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = #C2}) → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class Mixin extends core::Object /*isMixinDeclaration*/ {
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class SubClass extends test::_SubClass&Class&Mixin {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::_internal(value: true)
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ patched() → test::SubClass
|
||||
: this test::SubClass::_internal()
|
||||
@@ -45,6 +42,9 @@ class SubClass extends test::_SubClass&Class&Mixin {
|
||||
constructor unpatched() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::unpatched()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::_internal(value: true)
|
||||
;
|
||||
}
|
||||
abstract class _SubClass&Class&Mixin = test::Class with test::Mixin /*isAnonymousMixin*/ {
|
||||
synthetic constructor patched() → test::_SubClass&Class&Mixin
|
||||
|
||||
@@ -15,23 +15,23 @@ import "dart:_internal";
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class Class extends core::Object {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = false}) → self2::Class
|
||||
;
|
||||
@_in::patch
|
||||
external constructor patched() → self2::Class;
|
||||
constructor unpatched() → self2::Class
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = false}) → self2::Class
|
||||
;
|
||||
}
|
||||
abstract class Mixin extends core::Object /*isMixinDeclaration*/ {
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class SubClass extends self2::_SubClass&Class&Mixin {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → self2::SubClass
|
||||
;
|
||||
@_in::patch
|
||||
external constructor patched() → self2::SubClass;
|
||||
constructor unpatched() → self2::SubClass
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → self2::SubClass
|
||||
;
|
||||
}
|
||||
abstract class _SubClass&Class&Mixin = self2::Class with self2::Mixin /*isAnonymousMixin*/ {
|
||||
synthetic constructor patched() → self2::_SubClass&Class&Mixin
|
||||
|
||||
+6
-6
@@ -20,9 +20,6 @@ import "dart:_internal";
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = #C2}) → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ patched() → test::Class
|
||||
: this test::Class::_internal()
|
||||
@@ -30,14 +27,14 @@ class Class extends core::Object {
|
||||
constructor unpatched() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal({core::bool value = #C2}) → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class Mixin extends core::Object /*isMixinDeclaration*/ {
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class SubClass extends test::_SubClass&Class&Mixin {
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::_internal(value: true)
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ patched() → test::SubClass
|
||||
: this test::SubClass::_internal()
|
||||
@@ -45,6 +42,9 @@ class SubClass extends test::_SubClass&Class&Mixin {
|
||||
constructor unpatched() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::unpatched()
|
||||
;
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ _internal() → test::SubClass
|
||||
: super test::_SubClass&Class&Mixin::_internal(value: true)
|
||||
;
|
||||
}
|
||||
abstract class _SubClass&Class&Mixin extends test::Class implements test::Mixin /*isAnonymousMixin,isEliminatedMixin*/ {
|
||||
synthetic constructor patched() → test::_SubClass&Class&Mixin
|
||||
|
||||
@@ -5,8 +5,7 @@ import "dart:test";
|
||||
|
||||
static method main() → dynamic {}
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
@#C5
|
||||
@#C3
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
@@ -14,45 +13,43 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@#C5
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C6
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C8
|
||||
@#C10
|
||||
class Class<@#C12 @#C14 T extends core::Object? = dynamic> extends core::Object {
|
||||
class Class<@#C10 @#C12 T extends core::Object? = dynamic> extends core::Object {
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C14
|
||||
@#C6
|
||||
@#C16
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C18
|
||||
external constructor /* from org-dartlang-testcase:///patch_lib.dart */ •() → self2::Class<self2::Class::T%>;
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C18
|
||||
@#C6
|
||||
@#C20
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C22
|
||||
external method /* from org-dartlang-testcase:///patch_lib.dart */ method<@#C24 S extends core::Object? = dynamic>() → void;
|
||||
external method /* from org-dartlang-testcase:///patch_lib.dart */ method<@#C22 S extends core::Object? = dynamic>() → void;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "patch-library"
|
||||
#C1 = "origin-library"
|
||||
#C2 = null
|
||||
#C3 = core::pragma {name:#C1, options:#C2}
|
||||
#C4 = "origin-library"
|
||||
#C4 = "origin-class"
|
||||
#C5 = core::pragma {name:#C4, options:#C2}
|
||||
#C6 = _in::_Patch {}
|
||||
#C7 = "patch-class"
|
||||
#C8 = core::pragma {name:#C7, options:#C2}
|
||||
#C9 = "origin-class"
|
||||
#C9 = "origin-class-type-variable"
|
||||
#C10 = core::pragma {name:#C9, options:#C2}
|
||||
#C11 = "patch-class-type-variable"
|
||||
#C12 = core::pragma {name:#C11, options:#C2}
|
||||
#C13 = "origin-class-type-variable"
|
||||
#C13 = "origin-constructor"
|
||||
#C14 = core::pragma {name:#C13, options:#C2}
|
||||
#C15 = "patch-constructor"
|
||||
#C16 = core::pragma {name:#C15, options:#C2}
|
||||
#C17 = "origin-constructor"
|
||||
#C17 = "origin-procedure"
|
||||
#C18 = core::pragma {name:#C17, options:#C2}
|
||||
#C19 = "patch-procedure"
|
||||
#C20 = core::pragma {name:#C19, options:#C2}
|
||||
#C21 = "origin-procedure"
|
||||
#C21 = "patch-method-type-variable"
|
||||
#C22 = core::pragma {name:#C21, options:#C2}
|
||||
#C23 = "patch-method-type-variable"
|
||||
#C24 = core::pragma {name:#C23, options:#C2}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@ import "dart:test";
|
||||
|
||||
static method main() → dynamic {}
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
@#C5
|
||||
@#C3
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
@@ -14,45 +13,43 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@#C5
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C6
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C8
|
||||
@#C10
|
||||
class Class<@#C12 @#C14 T extends core::Object? = dynamic> extends core::Object {
|
||||
class Class<@#C10 @#C12 T extends core::Object? = dynamic> extends core::Object {
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C14
|
||||
@#C6
|
||||
@#C16
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C18
|
||||
external constructor /* from org-dartlang-testcase:///patch_lib.dart */ •() → self2::Class<self2::Class::T%>;
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C18
|
||||
@#C6
|
||||
@#C20
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C22
|
||||
external method /* from org-dartlang-testcase:///patch_lib.dart */ method<@#C24 S extends core::Object? = dynamic>() → void;
|
||||
external method /* from org-dartlang-testcase:///patch_lib.dart */ method<@#C22 S extends core::Object? = dynamic>() → void;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "patch-library"
|
||||
#C1 = "origin-library"
|
||||
#C2 = null
|
||||
#C3 = core::pragma {name:#C1, options:#C2}
|
||||
#C4 = "origin-library"
|
||||
#C4 = "origin-class"
|
||||
#C5 = core::pragma {name:#C4, options:#C2}
|
||||
#C6 = _in::_Patch {}
|
||||
#C7 = "patch-class"
|
||||
#C8 = core::pragma {name:#C7, options:#C2}
|
||||
#C9 = "origin-class"
|
||||
#C9 = "origin-class-type-variable"
|
||||
#C10 = core::pragma {name:#C9, options:#C2}
|
||||
#C11 = "patch-class-type-variable"
|
||||
#C12 = core::pragma {name:#C11, options:#C2}
|
||||
#C13 = "origin-class-type-variable"
|
||||
#C13 = "origin-constructor"
|
||||
#C14 = core::pragma {name:#C13, options:#C2}
|
||||
#C15 = "patch-constructor"
|
||||
#C16 = core::pragma {name:#C15, options:#C2}
|
||||
#C17 = "origin-constructor"
|
||||
#C17 = "origin-procedure"
|
||||
#C18 = core::pragma {name:#C17, options:#C2}
|
||||
#C19 = "patch-procedure"
|
||||
#C20 = core::pragma {name:#C19, options:#C2}
|
||||
#C21 = "origin-procedure"
|
||||
#C21 = "patch-method-type-variable"
|
||||
#C22 = core::pragma {name:#C21, options:#C2}
|
||||
#C23 = "patch-method-type-variable"
|
||||
#C24 = core::pragma {name:#C23, options:#C2}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import "dart:test";
|
||||
static method main() → dynamic
|
||||
;
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ const dart.core::pragma::_("patch-library")
|
||||
@dart.core::pragma::_("origin-library")
|
||||
library;
|
||||
import self as self2;
|
||||
@@ -15,34 +14,33 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@core::pragma::_("origin-class")
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ const core::pragma::_("patch-class")
|
||||
@core::pragma::_("origin-class")
|
||||
class Class<@core::pragma::_("patch-class-type-variable") @core::pragma::_("origin-class-type-variable") T extends core::Object? = dynamic> extends core::Object {
|
||||
class Class<@core::pragma::_("origin-class-type-variable") @core::pragma::_("patch-class-type-variable") T extends core::Object? = dynamic> extends core::Object {
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ const core::pragma::_("origin-constructor")
|
||||
@_in::patch
|
||||
@core::pragma::_("patch-constructor")
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ const core::pragma::_("origin-constructor")
|
||||
external constructor •() → self2::Class<self2::Class::T%>;
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ const core::pragma::_("origin-procedure")
|
||||
@_in::patch
|
||||
@core::pragma::_("patch-procedure")
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ const core::pragma::_("origin-procedure")
|
||||
external method method<@core::pragma::_("origin-method-type-variable") S extends core::Object? = dynamic>() → void;
|
||||
}
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:5:1 -> InstanceConstant(const pragma{pragma.name: "patch-library", pragma.options: null})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:5:2 -> InstanceConstant(const pragma{pragma.name: "origin-library", pragma.options: null})
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:11:1 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:12:1 -> InstanceConstant(const pragma{pragma.name: "patch-class", pragma.options: null})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:8:2 -> InstanceConstant(const pragma{pragma.name: "origin-class", pragma.options: null})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:10:25 -> InstanceConstant(const pragma{pragma.name: "patch-class-type-variable", pragma.options: null})
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:8:1 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:9:1 -> InstanceConstant(const pragma{pragma.name: "patch-class", pragma.options: null})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:9:14 -> InstanceConstant(const pragma{pragma.name: "origin-class-type-variable", pragma.options: null})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:13:16 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:13:25 -> InstanceConstant(const pragma{pragma.name: "patch-constructor", pragma.options: null})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:9:45 -> InstanceConstant(const pragma{pragma.name: "patch-class-type-variable", pragma.options: null})
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///origin_lib.dart:10:3 -> InstanceConstant(const pragma{pragma.name: "origin-constructor", pragma.options: null})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:14:47 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:14:56 -> InstanceConstant(const pragma{pragma.name: "patch-procedure", pragma.options: null})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:11:2 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:11:11 -> InstanceConstant(const pragma{pragma.name: "patch-constructor", pragma.options: null})
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///origin_lib.dart:13:3 -> InstanceConstant(const pragma{pragma.name: "origin-procedure", pragma.options: null})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///origin_lib.dart:14:12 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:14:21 -> InstanceConstant(const pragma{pragma.name: "patch-procedure", pragma.options: null})
|
||||
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///origin_lib.dart:14:25 -> InstanceConstant(const pragma{pragma.name: "origin-method-type-variable", pragma.options: null})
|
||||
Extra constant evaluation: evaluated: 14, effectively constant: 14
|
||||
Extra constant evaluation: evaluated: 13, effectively constant: 13
|
||||
|
||||
+12
-15
@@ -5,8 +5,7 @@ import "dart:test";
|
||||
|
||||
static method main() → dynamic {}
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C3
|
||||
@#C5
|
||||
@#C3
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
@@ -14,45 +13,43 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@#C5
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C6
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C8
|
||||
@#C10
|
||||
class Class<@#C12 @#C14 T extends core::Object? = dynamic> extends core::Object {
|
||||
class Class<@#C10 @#C12 T extends core::Object? = dynamic> extends core::Object {
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C14
|
||||
@#C6
|
||||
@#C16
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C18
|
||||
external constructor /* from org-dartlang-testcase:///patch_lib.dart */ •() → self2::Class<self2::Class::T%>;
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C18
|
||||
@#C6
|
||||
@#C20
|
||||
@/* from org-dartlang-testcase:///origin_lib.dart */ #C22
|
||||
external method /* from org-dartlang-testcase:///patch_lib.dart */ method<@#C24 S extends core::Object? = dynamic>() → void;
|
||||
external method /* from org-dartlang-testcase:///patch_lib.dart */ method<@#C22 S extends core::Object? = dynamic>() → void;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "patch-library"
|
||||
#C1 = "origin-library"
|
||||
#C2 = null
|
||||
#C3 = core::pragma {name:#C1, options:#C2}
|
||||
#C4 = "origin-library"
|
||||
#C4 = "origin-class"
|
||||
#C5 = core::pragma {name:#C4, options:#C2}
|
||||
#C6 = _in::_Patch {}
|
||||
#C7 = "patch-class"
|
||||
#C8 = core::pragma {name:#C7, options:#C2}
|
||||
#C9 = "origin-class"
|
||||
#C9 = "origin-class-type-variable"
|
||||
#C10 = core::pragma {name:#C9, options:#C2}
|
||||
#C11 = "patch-class-type-variable"
|
||||
#C12 = core::pragma {name:#C11, options:#C2}
|
||||
#C13 = "origin-class-type-variable"
|
||||
#C13 = "origin-constructor"
|
||||
#C14 = core::pragma {name:#C13, options:#C2}
|
||||
#C15 = "patch-constructor"
|
||||
#C16 = core::pragma {name:#C15, options:#C2}
|
||||
#C17 = "origin-constructor"
|
||||
#C17 = "origin-procedure"
|
||||
#C18 = core::pragma {name:#C17, options:#C2}
|
||||
#C19 = "patch-procedure"
|
||||
#C20 = core::pragma {name:#C19, options:#C2}
|
||||
#C21 = "origin-procedure"
|
||||
#C21 = "patch-method-type-variable"
|
||||
#C22 = core::pragma {name:#C21, options:#C2}
|
||||
#C23 = "patch-method-type-variable"
|
||||
#C24 = core::pragma {name:#C23, options:#C2}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
@pragma('patch-library')
|
||||
library;
|
||||
|
||||
// ignore: import_internal_library
|
||||
import 'dart:_internal';
|
||||
|
||||
|
||||
@@ -9,70 +9,95 @@ library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin class.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Can't inject public 'existingOriginMethod' into 'dart:test'.
|
||||
// Make 'existingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch constructor 'Class.missingOriginConstructor' doesn't match a constructor in the origin class.
|
||||
// Try changing the name to an existing constructor or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: 'existingOriginDeclaration' is already declared in this scope.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: Previous declaration of 'existingOriginDeclaration'.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: Constructor 'Class.existingOriginConstructor' conflicts with an existing constructor of the same name in the origin class.
|
||||
// Try changing the name of the constructor or adding an '@patch' annotation.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: This is the existing constructor.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Can't inject public 'existingOriginDeclaration' into 'dart:test'.
|
||||
// Make 'existingOriginDeclaration' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: 'ExistingOriginClass' is already declared in this scope.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: Previous declaration of 'ExistingOriginClass'.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Can't inject public 'ExistingOriginClass' into 'dart:test'.
|
||||
// Make 'ExistingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin library.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Can't inject public 'missingOriginMethod' into 'dart:test'.
|
||||
// Make 'missingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Patch class 'MissingOriginClass' doesn't match a class in the origin library.
|
||||
// Try changing the name to an existing class or removing the '@patch' annotation.
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Can't inject public 'MissingOriginClass' into 'dart:test'.
|
||||
// Make 'MissingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Patch 'MissingOriginExtension' doesn't match a declaration in the origin library.
|
||||
// Try changing the name to an existing declaration or removing the '@patch' annotation.
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin library.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Can't inject public 'MissingOriginExtension' into 'dart:test'.
|
||||
// Make 'MissingOriginExtension' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Declaration 'existingOriginDeclaration' conflicts with an existing declaration of the same name in the origin library.
|
||||
// Try changing the name of the declaration.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: This is the existing member.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: 'Class.existingOriginConstructor' is already declared in this scope.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: Previous declaration of 'Class.existingOriginConstructor'.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Class 'ExistingOriginClass' conflicts with an existing class of the same name in the origin library.
|
||||
// Try changing the name of the class or adding an '@patch' annotation.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: This is the existing class.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch member 'missingOriginConstructor' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
import self as self2;
|
||||
import "dart:_internal" as _in;
|
||||
@@ -80,51 +105,50 @@ import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@#C1
|
||||
class MissingOriginClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::MissingOriginClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class existingOriginDeclaration#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#0#1
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#0#1
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor •() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor existingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
method existingOriginMethod() → void {}
|
||||
@#C1
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void {}
|
||||
}
|
||||
class existingOriginDeclaration#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#1#0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#1#0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass extends core::Object {
|
||||
synthetic constructor •() → self2::ExistingOriginClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@#C1
|
||||
class _#MissingOriginClass#augmentationWithoutOrigin0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::_#MissingOriginClass#augmentationWithoutOrigin0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@#C1
|
||||
extension MissingOriginExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
}
|
||||
static method existingOriginMethod() → void {}
|
||||
static method existingOriginDeclaration() → void {}
|
||||
@#C1
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ existingOriginMethod#1() → void {}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -9,70 +9,95 @@ library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin class.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Can't inject public 'existingOriginMethod' into 'dart:test'.
|
||||
// Make 'existingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch constructor 'Class.missingOriginConstructor' doesn't match a constructor in the origin class.
|
||||
// Try changing the name to an existing constructor or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: 'existingOriginDeclaration' is already declared in this scope.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: Previous declaration of 'existingOriginDeclaration'.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: Constructor 'Class.existingOriginConstructor' conflicts with an existing constructor of the same name in the origin class.
|
||||
// Try changing the name of the constructor or adding an '@patch' annotation.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: This is the existing constructor.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Can't inject public 'existingOriginDeclaration' into 'dart:test'.
|
||||
// Make 'existingOriginDeclaration' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: 'ExistingOriginClass' is already declared in this scope.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: Previous declaration of 'ExistingOriginClass'.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Can't inject public 'ExistingOriginClass' into 'dart:test'.
|
||||
// Make 'ExistingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin library.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Can't inject public 'missingOriginMethod' into 'dart:test'.
|
||||
// Make 'missingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Patch class 'MissingOriginClass' doesn't match a class in the origin library.
|
||||
// Try changing the name to an existing class or removing the '@patch' annotation.
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Can't inject public 'MissingOriginClass' into 'dart:test'.
|
||||
// Make 'MissingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Patch 'MissingOriginExtension' doesn't match a declaration in the origin library.
|
||||
// Try changing the name to an existing declaration or removing the '@patch' annotation.
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin library.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Can't inject public 'MissingOriginExtension' into 'dart:test'.
|
||||
// Make 'MissingOriginExtension' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Declaration 'existingOriginDeclaration' conflicts with an existing declaration of the same name in the origin library.
|
||||
// Try changing the name of the declaration.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: This is the existing member.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: 'Class.existingOriginConstructor' is already declared in this scope.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: Previous declaration of 'Class.existingOriginConstructor'.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Class 'ExistingOriginClass' conflicts with an existing class of the same name in the origin library.
|
||||
// Try changing the name of the class or adding an '@patch' annotation.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: This is the existing class.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch member 'missingOriginConstructor' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
import self as self2;
|
||||
import "dart:_internal" as _in;
|
||||
@@ -80,51 +105,50 @@ import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@#C1
|
||||
class MissingOriginClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::MissingOriginClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class existingOriginDeclaration#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#0#1
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#0#1
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor •() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor existingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
method existingOriginMethod() → void {}
|
||||
@#C1
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void {}
|
||||
}
|
||||
class existingOriginDeclaration#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#1#0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#1#0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass extends core::Object {
|
||||
synthetic constructor •() → self2::ExistingOriginClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@#C1
|
||||
class _#MissingOriginClass#augmentationWithoutOrigin0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::_#MissingOriginClass#augmentationWithoutOrigin0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@#C1
|
||||
extension MissingOriginExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
}
|
||||
static method existingOriginMethod() → void {}
|
||||
static method existingOriginDeclaration() → void {}
|
||||
@#C1
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ existingOriginMethod#1() → void {}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -10,70 +10,95 @@ library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin class.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Can't inject public 'existingOriginMethod' into 'dart:test'.
|
||||
// Make 'existingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch constructor 'Class.missingOriginConstructor' doesn't match a constructor in the origin class.
|
||||
// Try changing the name to an existing constructor or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: 'existingOriginDeclaration' is already declared in this scope.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: Previous declaration of 'existingOriginDeclaration'.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: Constructor 'Class.existingOriginConstructor' conflicts with an existing constructor of the same name in the origin class.
|
||||
// Try changing the name of the constructor or adding an '@patch' annotation.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: This is the existing constructor.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Can't inject public 'existingOriginDeclaration' into 'dart:test'.
|
||||
// Make 'existingOriginDeclaration' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: 'ExistingOriginClass' is already declared in this scope.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: Previous declaration of 'ExistingOriginClass'.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Can't inject public 'ExistingOriginClass' into 'dart:test'.
|
||||
// Make 'ExistingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin library.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Can't inject public 'missingOriginMethod' into 'dart:test'.
|
||||
// Make 'missingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Patch class 'MissingOriginClass' doesn't match a class in the origin library.
|
||||
// Try changing the name to an existing class or removing the '@patch' annotation.
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Can't inject public 'MissingOriginClass' into 'dart:test'.
|
||||
// Make 'MissingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Patch 'MissingOriginExtension' doesn't match a declaration in the origin library.
|
||||
// Try changing the name to an existing declaration or removing the '@patch' annotation.
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin library.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Can't inject public 'MissingOriginExtension' into 'dart:test'.
|
||||
// Make 'MissingOriginExtension' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Declaration 'existingOriginDeclaration' conflicts with an existing declaration of the same name in the origin library.
|
||||
// Try changing the name of the declaration.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: This is the existing member.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: 'Class.existingOriginConstructor' is already declared in this scope.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: Previous declaration of 'Class.existingOriginConstructor'.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Class 'ExistingOriginClass' conflicts with an existing class of the same name in the origin library.
|
||||
// Try changing the name of the class or adding an '@patch' annotation.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: This is the existing class.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch member 'missingOriginConstructor' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
import self as self2;
|
||||
import "dart:_internal" as _in;
|
||||
@@ -81,39 +106,39 @@ import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@_in::patch
|
||||
class MissingOriginClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::MissingOriginClass
|
||||
;
|
||||
}
|
||||
class existingOriginDeclaration#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#0#1
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#0#1
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class Class extends core::Object {
|
||||
@_in::patch
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
;
|
||||
constructor •() → self2::Class
|
||||
;
|
||||
constructor existingOriginConstructor() → self2::Class
|
||||
;
|
||||
@_in::patch
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
;
|
||||
method existingOriginMethod() → void
|
||||
;
|
||||
@_in::patch
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void
|
||||
;
|
||||
}
|
||||
class existingOriginDeclaration#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#1#0
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#1#0
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass extends core::Object {
|
||||
synthetic constructor •() → self2::ExistingOriginClass
|
||||
;
|
||||
}
|
||||
@_in::patch
|
||||
class _#MissingOriginClass#augmentationWithoutOrigin0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::_#MissingOriginClass#augmentationWithoutOrigin0
|
||||
;
|
||||
}
|
||||
@_in::patch
|
||||
extension MissingOriginExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
}
|
||||
static method existingOriginMethod() → void
|
||||
@@ -123,15 +148,13 @@ static method existingOriginDeclaration() → void
|
||||
@_in::patch
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void
|
||||
;
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ existingOriginMethod#1() → void
|
||||
;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///patch_lib.dart:24:2 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:8:1 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///patch_lib.dart:10:4 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///patch_lib.dart:15:4 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///patch_lib.dart:24:2 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///patch_lib.dart:27:2 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ org-dartlang-testcase:///patch_lib.dart:21:2 -> InstanceConstant(const _Patch{})
|
||||
Extra constant evaluation: evaluated: 6, effectively constant: 6
|
||||
|
||||
+91
-67
@@ -9,70 +9,95 @@ library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin class.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Can't inject public 'existingOriginMethod' into 'dart:test'.
|
||||
// Make 'existingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch constructor 'Class.missingOriginConstructor' doesn't match a constructor in the origin class.
|
||||
// Try changing the name to an existing constructor or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: 'existingOriginDeclaration' is already declared in this scope.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: Previous declaration of 'existingOriginDeclaration'.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: Constructor 'Class.existingOriginConstructor' conflicts with an existing constructor of the same name in the origin class.
|
||||
// Try changing the name of the constructor or adding an '@patch' annotation.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: This is the existing constructor.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Can't inject public 'existingOriginDeclaration' into 'dart:test'.
|
||||
// Make 'existingOriginDeclaration' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: 'ExistingOriginClass' is already declared in this scope.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: Previous declaration of 'ExistingOriginClass'.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Can't inject public 'ExistingOriginClass' into 'dart:test'.
|
||||
// Make 'ExistingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin library.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:22:6: Error: Can't inject public 'missingOriginMethod' into 'dart:test'.
|
||||
// Make 'missingOriginMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Patch class 'MissingOriginClass' doesn't match a class in the origin library.
|
||||
// Try changing the name to an existing class or removing the '@patch' annotation.
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:25:7: Error: Can't inject public 'MissingOriginClass' into 'dart:test'.
|
||||
// Make 'MissingOriginClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// class MissingOriginClass {} /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Patch 'MissingOriginExtension' doesn't match a declaration in the origin library.
|
||||
// Try changing the name to an existing declaration or removing the '@patch' annotation.
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:30:6: Error: Member 'existingOriginMethod' conflicts with an existing member of the same name in the origin library.
|
||||
// Try changing the name of the member or adding an '@patch' annotation.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:13:6: Context: This is the existing member.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:28:11: Error: Can't inject public 'MissingOriginExtension' into 'dart:test'.
|
||||
// Make 'MissingOriginExtension' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal").
|
||||
// extension MissingOriginExtension on int {} /* Error: missing origin extension */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:32:7: Error: Declaration 'existingOriginDeclaration' conflicts with an existing declaration of the same name in the origin library.
|
||||
// Try changing the name of the declaration.
|
||||
// class existingOriginDeclaration {} /* Error: conflict with origin declaration */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:15:6: Context: This is the existing member.
|
||||
// void existingOriginDeclaration() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:13:3: Error: 'Class.existingOriginConstructor' is already declared in this scope.
|
||||
// Class.existingOriginConstructor(); /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:8:3: Context: Previous declaration of 'Class.existingOriginConstructor'.
|
||||
// Class.existingOriginConstructor();
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:34:7: Error: Class 'ExistingOriginClass' conflicts with an existing class of the same name in the origin library.
|
||||
// Try changing the name of the class or adding an '@patch' annotation.
|
||||
// class ExistingOriginClass {} /* Error: conflict with origin class */
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:17:7: Context: This is the existing class.
|
||||
// class ExistingOriginClass {}
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:18:8: Error: 'existingOriginMethod' is already declared in this scope.
|
||||
// void existingOriginMethod() {} /* Error: conflict with origin method */
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/general/patch_conflict/origin_lib.dart:10:8: Context: Previous declaration of 'existingOriginMethod'.
|
||||
// void existingOriginMethod() {}
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:11:3: Error: Patch member 'missingOriginConstructor' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// Class.missingOriginConstructor(); /* Error: missing origin class */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/patch_conflict/patch_lib.dart:16:8: Error: Patch member 'missingOriginMethod' doesn't match a member in the origin class.
|
||||
// Try changing the name to an existing member or removing the '@patch' annotation.
|
||||
// void missingOriginMethod() {} /* Error: missing origin method */
|
||||
// ^
|
||||
//
|
||||
import self as self2;
|
||||
import "dart:_internal" as _in;
|
||||
@@ -80,51 +105,50 @@ import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
@#C1
|
||||
class MissingOriginClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::MissingOriginClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class existingOriginDeclaration#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#0#1
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#0#1 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#0#1
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor •() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
constructor existingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
constructor /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginConstructor() → self2::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
method existingOriginMethod() → void {}
|
||||
@#C1
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void {}
|
||||
}
|
||||
class existingOriginDeclaration#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::existingOriginDeclaration#1#0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass#1#0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::ExistingOriginClass#1#0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class ExistingOriginClass extends core::Object {
|
||||
synthetic constructor •() → self2::ExistingOriginClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@#C1
|
||||
class _#MissingOriginClass#augmentationWithoutOrigin0 extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
synthetic constructor •() → self2::_#MissingOriginClass#augmentationWithoutOrigin0
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
@#C1
|
||||
extension MissingOriginExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart
|
||||
}
|
||||
static method existingOriginMethod() → void {}
|
||||
static method existingOriginDeclaration() → void {}
|
||||
@#C1
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ missingOriginMethod() → void {}
|
||||
static method /* from org-dartlang-testcase:///patch_lib.dart */ existingOriginMethod#1() → void {}
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -86,26 +86,6 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6aImpl::T%) → void f) → test::_Class6aImpl<test::_Class6aImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements test::Class6b<test::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6bImpl::T%) → void f) → test::_Class6bImpl<test::_Class6bImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6cImpl::T%) → void f) → test::_Class6cImpl<test::_Class6cImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class _Class4b&Object&Mixin = core::Object with test::Mixin /*isAnonymousMixin,hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
const synthetic constructor •() → test::_Class4b&Object&Mixin
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class Interface extends core::Object {
|
||||
synthetic constructor •() → test::Interface
|
||||
: super core::Object::•()
|
||||
@@ -236,6 +216,21 @@ class Class6c<T extends core::Object? = dynamic> extends core::Object {
|
||||
factory Class6c(void Function(T) f) = _Class6cImpl<T>;
|
||||
^";
|
||||
}
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6aImpl::T%) → void f) → test::_Class6aImpl<test::_Class6aImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements test::Class6b<test::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6bImpl::T%) → void f) → test::_Class6bImpl<test::_Class6bImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6cImpl::T%) → void f) → test::_Class6cImpl<test::_Class6cImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class _Class4a&Object&Mixin = core::Object with test::Mixin /*isAnonymousMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → test::_Class4a&Object&Mixin
|
||||
: super core::Object::•()
|
||||
|
||||
+15
-20
@@ -86,26 +86,6 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6aImpl::T%) → void f) → test::_Class6aImpl<test::_Class6aImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements test::Class6b<test::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6bImpl::T%) → void f) → test::_Class6bImpl<test::_Class6bImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6cImpl::T%) → void f) → test::_Class6cImpl<test::_Class6cImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class _Class4b&Object&Mixin = core::Object with test::Mixin /*isAnonymousMixin,hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
const synthetic constructor •() → test::_Class4b&Object&Mixin
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class Interface extends core::Object {
|
||||
synthetic constructor •() → test::Interface
|
||||
: super core::Object::•()
|
||||
@@ -236,6 +216,21 @@ class Class6c<T extends core::Object? = dynamic> extends core::Object {
|
||||
factory Class6c(void Function(T) f) = _Class6cImpl<T>;
|
||||
^";
|
||||
}
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6aImpl::T%) → void f) → test::_Class6aImpl<test::_Class6aImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements test::Class6b<test::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6bImpl::T%) → void f) → test::_Class6bImpl<test::_Class6bImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6cImpl::T%) → void f) → test::_Class6cImpl<test::_Class6cImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class _Class4a&Object&Mixin = core::Object with test::Mixin /*isAnonymousMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → test::_Class4a&Object&Mixin
|
||||
: super core::Object::•()
|
||||
|
||||
+12
-17
@@ -40,23 +40,6 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((self2::_Class6aImpl::T%) → void f) → self2::_Class6aImpl<self2::_Class6aImpl::T%>
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements self2::Class6b<self2::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((self2::_Class6bImpl::T%) → void f) → self2::_Class6bImpl<self2::_Class6bImpl::T%>
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((self2::_Class6cImpl::T%) → void f) → self2::_Class6cImpl<self2::_Class6cImpl::T%>
|
||||
;
|
||||
}
|
||||
abstract class _Class4b&Object&Mixin = core::Object with self2::Mixin /*isAnonymousMixin,hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
const synthetic constructor •() → self2::_Class4b&Object&Mixin
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class Interface extends core::Object {
|
||||
synthetic constructor •() → self2::Interface
|
||||
;
|
||||
@@ -158,6 +141,18 @@ class Class6c<T extends core::Object? = dynamic> extends core::Object {
|
||||
external static factory •<T extends core::Object? = dynamic>((self2::Class6c::•::T%) → void f) → self2::Class6c<self2::Class6c::•::T%>
|
||||
return new self2::_Class6cImpl::•<self2::Class6c::•::T%>(f);
|
||||
}
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((self2::_Class6aImpl::T%) → void f) → self2::_Class6aImpl<self2::_Class6aImpl::T%>
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements self2::Class6b<self2::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((self2::_Class6bImpl::T%) → void f) → self2::_Class6bImpl<self2::_Class6bImpl::T%>
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((self2::_Class6cImpl::T%) → void f) → self2::_Class6cImpl<self2::_Class6cImpl::T%>
|
||||
;
|
||||
}
|
||||
abstract class _Class4a&Object&Mixin = core::Object with self2::Mixin /*isAnonymousMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self2::_Class4a&Object&Mixin
|
||||
: super core::Object::•()
|
||||
|
||||
+15
-20
@@ -86,26 +86,6 @@ import "dart:_internal" as _in;
|
||||
|
||||
import "dart:_internal";
|
||||
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6aImpl::T%) → void f) → test::_Class6aImpl<test::_Class6aImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements test::Class6b<test::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6bImpl::T%) → void f) → test::_Class6bImpl<test::_Class6bImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6cImpl::T%) → void f) → test::_Class6cImpl<test::_Class6cImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class _Class4b&Object&Mixin extends core::Object implements test::Mixin /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { // from org-dartlang-testcase:///patch_lib.dart
|
||||
const synthetic constructor •() → test::_Class4b&Object&Mixin
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class Interface extends core::Object {
|
||||
synthetic constructor •() → test::Interface
|
||||
: super core::Object::•()
|
||||
@@ -236,6 +216,21 @@ class Class6c<T extends core::Object? = dynamic> extends core::Object {
|
||||
factory Class6c(void Function(T) f) = _Class6cImpl<T>;
|
||||
^";
|
||||
}
|
||||
class _Class6aImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6aImpl::T%) → void f) → test::_Class6aImpl<test::_Class6aImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6bImpl<T extends core::Object? = dynamic> extends core::Object implements test::Class6b<test::_Class6bImpl::T%> { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6bImpl::T%) → void f) → test::_Class6bImpl<test::_Class6bImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
class _Class6cImpl<T extends core::Object? = dynamic> extends core::Object { // from org-dartlang-testcase:///patch_lib.dart
|
||||
constructor •((test::_Class6cImpl::T%) → void f) → test::_Class6cImpl<test::_Class6cImpl::T%>
|
||||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
abstract class _Class4a&Object&Mixin extends core::Object implements test::Mixin /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → test::_Class4a&Object&Mixin
|
||||
: super core::Object::•()
|
||||
|
||||
@@ -147,95 +147,95 @@ class Class extends core::Object {
|
||||
method _method() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
method /* from org-dartlang-testcase:///patch_lib1.dart */ _method1() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
}
|
||||
extension NamedInjectedExtension1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|namedInjectedExtensionMethod1;
|
||||
method tearoff namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|get#namedInjectedExtensionMethod1;
|
||||
method _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#1|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#1|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension NamedInjectedExtension2 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|namedInjectedExtensionMethod2;
|
||||
method tearoff namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|get#namedInjectedExtensionMethod2;
|
||||
method _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension /* unnamed */ _extension#3 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#3|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#3|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension Extension on test::Class {
|
||||
method namedExtensionMethod = test::Extension|namedExtensionMethod;
|
||||
method tearoff namedExtensionMethod = test::Extension|get#namedExtensionMethod;
|
||||
method _namedExtensionPrivateMethod = test::Extension|_namedExtensionPrivateMethod;
|
||||
method tearoff _namedExtensionPrivateMethod = test::Extension|get#_namedExtensionPrivateMethod;
|
||||
}
|
||||
extension /* unnamed */ _extension#5 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#5|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#5|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#5|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#5|get#_unnamedExtensionPrivateMethod;
|
||||
extension NamedInjectedExtension1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|namedInjectedExtensionMethod1;
|
||||
method tearoff namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|get#namedInjectedExtensionMethod1;
|
||||
method _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension NamedInjectedExtension2 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|namedInjectedExtensionMethod2;
|
||||
method tearoff namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|get#namedInjectedExtensionMethod2;
|
||||
method _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension /* unnamed */ _extension#3 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#3|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#3|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#3|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#3|get#_unnamedExtensionPrivateMethod;
|
||||
}
|
||||
extension /* unnamed */ _extension#4 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#4|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#4|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#5 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#5|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#5|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
static method _method(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method Extension|namedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method Extension|get#namedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
@@ -243,25 +243,25 @@ static extension-member method Extension|get#namedExtensionMethod(lowered final
|
||||
static extension-member method Extension|_namedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method Extension|get#_namedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::Extension|_namedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#5|unnamedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#5|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#5|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#5|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#3|unnamedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#3|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#3|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#3|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedExtensionPrivateMethod(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib1.dart */ _method1(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|namedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|get#namedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
@@ -269,25 +269,25 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|namedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|get#namedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
@@ -295,12 +295,12 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
+83
-83
@@ -147,95 +147,95 @@ class Class extends core::Object {
|
||||
method _method() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
method /* from org-dartlang-testcase:///patch_lib1.dart */ _method1() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
}
|
||||
extension NamedInjectedExtension1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|namedInjectedExtensionMethod1;
|
||||
method tearoff namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|get#namedInjectedExtensionMethod1;
|
||||
method _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#1|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#1|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension NamedInjectedExtension2 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|namedInjectedExtensionMethod2;
|
||||
method tearoff namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|get#namedInjectedExtensionMethod2;
|
||||
method _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension /* unnamed */ _extension#3 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#3|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#3|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension Extension on test::Class {
|
||||
method namedExtensionMethod = test::Extension|namedExtensionMethod;
|
||||
method tearoff namedExtensionMethod = test::Extension|get#namedExtensionMethod;
|
||||
method _namedExtensionPrivateMethod = test::Extension|_namedExtensionPrivateMethod;
|
||||
method tearoff _namedExtensionPrivateMethod = test::Extension|get#_namedExtensionPrivateMethod;
|
||||
}
|
||||
extension /* unnamed */ _extension#5 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#5|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#5|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#5|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#5|get#_unnamedExtensionPrivateMethod;
|
||||
extension NamedInjectedExtension1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|namedInjectedExtensionMethod1;
|
||||
method tearoff namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|get#namedInjectedExtensionMethod1;
|
||||
method _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension NamedInjectedExtension2 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|namedInjectedExtensionMethod2;
|
||||
method tearoff namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|get#namedInjectedExtensionMethod2;
|
||||
method _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension /* unnamed */ _extension#3 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#3|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#3|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#3|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#3|get#_unnamedExtensionPrivateMethod;
|
||||
}
|
||||
extension /* unnamed */ _extension#4 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#4|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#4|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#5 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#5|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#5|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
static method _method(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method Extension|namedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method Extension|get#namedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
@@ -243,25 +243,25 @@ static extension-member method Extension|get#namedExtensionMethod(lowered final
|
||||
static extension-member method Extension|_namedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method Extension|get#_namedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::Extension|_namedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#5|unnamedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#5|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#5|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#5|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#3|unnamedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#3|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#3|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#3|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedExtensionPrivateMethod(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib1.dart */ _method1(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|namedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|get#namedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
@@ -269,25 +269,25 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|namedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|get#namedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
@@ -295,12 +295,12 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
+39
-39
@@ -44,41 +44,41 @@ class Class extends core::Object {
|
||||
method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2() → void
|
||||
;
|
||||
}
|
||||
extension Extension on test::Class {
|
||||
method namedExtensionMethod = test::Extension|namedExtensionMethod;
|
||||
method tearoff namedExtensionMethod = test::Extension|get#namedExtensionMethod;
|
||||
method _namedExtensionPrivateMethod = test::Extension|_namedExtensionPrivateMethod;
|
||||
method tearoff _namedExtensionPrivateMethod = test::Extension|get#_namedExtensionPrivateMethod;
|
||||
}
|
||||
extension NamedInjectedExtension1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|namedInjectedExtensionMethod1;
|
||||
method tearoff namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|get#namedInjectedExtensionMethod1;
|
||||
method _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#1|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#1|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension NamedInjectedExtension2 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|namedInjectedExtensionMethod2;
|
||||
method tearoff namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|get#namedInjectedExtensionMethod2;
|
||||
method _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension /* unnamed */ _extension#3 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#3|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#3|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
extension /* unnamed */ _extension#3 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#3|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#3|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#3|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#3|get#_unnamedExtensionPrivateMethod;
|
||||
}
|
||||
extension Extension on test::Class {
|
||||
method namedExtensionMethod = test::Extension|namedExtensionMethod;
|
||||
method tearoff namedExtensionMethod = test::Extension|get#namedExtensionMethod;
|
||||
method _namedExtensionPrivateMethod = test::Extension|_namedExtensionPrivateMethod;
|
||||
method tearoff _namedExtensionPrivateMethod = test::Extension|get#_namedExtensionPrivateMethod;
|
||||
extension /* unnamed */ _extension#4 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#4|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#4|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#5 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#5|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#5|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#5|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#5|get#_unnamedExtensionPrivateMethod;
|
||||
extension /* unnamed */ _extension#5 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#5|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#5|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
static method _method(test::Class c) → void
|
||||
;
|
||||
@@ -90,14 +90,14 @@ static extension-member method Extension|_namedExtensionPrivateMethod(lowered fi
|
||||
;
|
||||
static extension-member method Extension|get#_namedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::Extension|_namedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#5|unnamedExtensionMethod(lowered final test::Class #this) → void
|
||||
static extension-member method _extension#3|unnamedExtensionMethod(lowered final test::Class #this) → void
|
||||
;
|
||||
static extension-member method _extension#5|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#5|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void
|
||||
static extension-member method _extension#3|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#3|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void
|
||||
;
|
||||
static extension-member method _extension#5|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#3|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedExtensionPrivateMethod(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib1.dart */ _method1(test::Class c) → void
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|namedInjectedExtensionMethod1(lowered final test::Class #this) → void
|
||||
@@ -108,14 +108,14 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2(test::Class c) → void
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|namedInjectedExtensionMethod2(lowered final test::Class #this) → void
|
||||
@@ -126,14 +126,14 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void
|
||||
;
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
|
||||
+83
-83
@@ -147,95 +147,95 @@ class Class extends core::Object {
|
||||
method _method() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
method /* from org-dartlang-testcase:///patch_lib1.dart */ _method1() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2() → void {
|
||||
test::Extension|namedExtensionMethod(this);
|
||||
test::Extension|_namedExtensionPrivateMethod(this);
|
||||
test::_extension#5|unnamedExtensionMethod(this);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(this);
|
||||
test::_extension#3|unnamedExtensionMethod(this);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(this);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(this);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(this);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(this);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(this);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(this);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(this);
|
||||
}
|
||||
}
|
||||
extension NamedInjectedExtension1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|namedInjectedExtensionMethod1;
|
||||
method tearoff namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|get#namedInjectedExtensionMethod1;
|
||||
method _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#1|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#1|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#1|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension NamedInjectedExtension2 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|namedInjectedExtensionMethod2;
|
||||
method tearoff namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|get#namedInjectedExtensionMethod2;
|
||||
method _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension /* unnamed */ _extension#3 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#3|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#3|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#3|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension Extension on test::Class {
|
||||
method namedExtensionMethod = test::Extension|namedExtensionMethod;
|
||||
method tearoff namedExtensionMethod = test::Extension|get#namedExtensionMethod;
|
||||
method _namedExtensionPrivateMethod = test::Extension|_namedExtensionPrivateMethod;
|
||||
method tearoff _namedExtensionPrivateMethod = test::Extension|get#_namedExtensionPrivateMethod;
|
||||
}
|
||||
extension /* unnamed */ _extension#5 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#5|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#5|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#5|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#5|get#_unnamedExtensionPrivateMethod;
|
||||
extension NamedInjectedExtension1 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|namedInjectedExtensionMethod1;
|
||||
method tearoff namedInjectedExtensionMethod1 = test::NamedInjectedExtension1|get#namedInjectedExtensionMethod1;
|
||||
method _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod1 = test::NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension NamedInjectedExtension2 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|namedInjectedExtensionMethod2;
|
||||
method tearoff namedInjectedExtensionMethod2 = test::NamedInjectedExtension2|get#namedInjectedExtensionMethod2;
|
||||
method _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _namedInjectedExtensionPrivateMethod2 = test::NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
extension /* unnamed */ _extension#3 on test::Class {
|
||||
method unnamedExtensionMethod = test::_extension#3|unnamedExtensionMethod;
|
||||
method tearoff unnamedExtensionMethod = test::_extension#3|get#unnamedExtensionMethod;
|
||||
method _unnamedExtensionPrivateMethod = test::_extension#3|_unnamedExtensionPrivateMethod;
|
||||
method tearoff _unnamedExtensionPrivateMethod = test::_extension#3|get#_unnamedExtensionPrivateMethod;
|
||||
}
|
||||
extension /* unnamed */ _extension#4 on test::Class { // from org-dartlang-testcase:///patch_lib1.dart
|
||||
method unnamedInjectedExtensionMethod1 = test::_extension#4|unnamedInjectedExtensionMethod1;
|
||||
method tearoff unnamedInjectedExtensionMethod1 = test::_extension#4|get#unnamedInjectedExtensionMethod1;
|
||||
method _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|_unnamedInjectedExtensionPrivateMethod1;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod1 = test::_extension#4|get#_unnamedInjectedExtensionPrivateMethod1;
|
||||
}
|
||||
extension /* unnamed */ _extension#5 on test::Class { // from org-dartlang-testcase:///patch_lib2.dart
|
||||
method unnamedInjectedExtensionMethod2 = test::_extension#5|unnamedInjectedExtensionMethod2;
|
||||
method tearoff unnamedInjectedExtensionMethod2 = test::_extension#5|get#unnamedInjectedExtensionMethod2;
|
||||
method _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|_unnamedInjectedExtensionPrivateMethod2;
|
||||
method tearoff _unnamedInjectedExtensionPrivateMethod2 = test::_extension#5|get#_unnamedInjectedExtensionPrivateMethod2;
|
||||
}
|
||||
static method _method(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method Extension|namedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method Extension|get#namedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
@@ -243,25 +243,25 @@ static extension-member method Extension|get#namedExtensionMethod(lowered final
|
||||
static extension-member method Extension|_namedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method Extension|get#_namedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::Extension|_namedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#5|unnamedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#5|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#5|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#5|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedExtensionPrivateMethod(#this);
|
||||
static extension-member method _extension#3|unnamedExtensionMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#3|get#unnamedExtensionMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedExtensionMethod(#this);
|
||||
static extension-member method _extension#3|_unnamedExtensionPrivateMethod(lowered final test::Class #this) → void {}
|
||||
static extension-member method _extension#3|get#_unnamedExtensionPrivateMethod(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedExtensionPrivateMethod(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib1.dart */ _method1(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|namedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|get#namedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
@@ -269,25 +269,25 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ NamedInjectedExtension1|get#_namedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#1|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|unnamedInjectedExtensionMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#unnamedInjectedExtensionMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|unnamedInjectedExtensionMethod1(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib1.dart */ _extension#4|get#_unnamedInjectedExtensionPrivateMethod1(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(#this);
|
||||
static method /* from org-dartlang-testcase:///patch_lib2.dart */ _method2(test::Class c) → void {
|
||||
test::Extension|namedExtensionMethod(c);
|
||||
test::Extension|_namedExtensionPrivateMethod(c);
|
||||
test::_extension#5|unnamedExtensionMethod(c);
|
||||
test::_extension#5|_unnamedExtensionPrivateMethod(c);
|
||||
test::_extension#3|unnamedExtensionMethod(c);
|
||||
test::_extension#3|_unnamedExtensionPrivateMethod(c);
|
||||
test::NamedInjectedExtension1|namedInjectedExtensionMethod1(c);
|
||||
test::NamedInjectedExtension1|_namedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#1|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#1|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::_extension#4|unnamedInjectedExtensionMethod1(c);
|
||||
test::_extension#4|_unnamedInjectedExtensionPrivateMethod1(c);
|
||||
test::NamedInjectedExtension2|namedInjectedExtensionMethod2(c);
|
||||
test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#3|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
test::_extension#5|unnamedInjectedExtensionMethod2(c);
|
||||
test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(c);
|
||||
}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|namedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|get#namedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
@@ -295,12 +295,12 @@ static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ NamedInjectedExtension2|get#_namedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::NamedInjectedExtension2|_namedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#3|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#3|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|unnamedInjectedExtensionMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#unnamedInjectedExtensionMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|unnamedInjectedExtensionMethod2(#this);
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → void {}
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib2.dart */ _extension#5|get#_unnamedInjectedExtensionPrivateMethod2(lowered final test::Class #this) → () → void
|
||||
return () → void => test::_extension#5|_unnamedInjectedExtensionPrivateMethod2(#this);
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"vm": {
|
||||
"comment:0": "This adds to the default libraries found in the platform.",
|
||||
"libraries": {
|
||||
"test": {
|
||||
"patches": [
|
||||
"patch_lib.dart"
|
||||
],
|
||||
"uri": "origin_lib.dart"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'dart:test';
|
||||
|
||||
main() {
|
||||
Class().method();
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
library;
|
||||
import self as self;
|
||||
import "dart:test" as test;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:test";
|
||||
|
||||
static method main() → dynamic {
|
||||
new test::Class::•().{test::Class::method}(){() → core::int};
|
||||
}
|
||||
|
||||
library;
|
||||
import self as test;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
import "org-dartlang-testcase:///main_lib.dart" as prefix;
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
field core::int _field = #C2 /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
synthetic constructor •() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ method() → core::int
|
||||
return #C2;
|
||||
}
|
||||
@#C1
|
||||
extension Extension on core::int {
|
||||
method method = test::Extension|method;
|
||||
method tearoff method = test::Extension|get#method;
|
||||
static field _field = test::Extension|_field;
|
||||
}
|
||||
static field core::int Extension|_field = #C2 /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|method(lowered final core::int #this) → core::int
|
||||
return #C2;
|
||||
static extension-member method Extension|get#method(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::Extension|method(#this);
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
|
||||
static const field core::int value = #C2;
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
#C2 = 5
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
library;
|
||||
import self as self;
|
||||
import "dart:test" as test;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:test";
|
||||
|
||||
static method main() → dynamic {
|
||||
new test::Class::•().{test::Class::method}(){() → core::int};
|
||||
}
|
||||
|
||||
library;
|
||||
import self as test;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
import "org-dartlang-testcase:///main_lib.dart" as prefix;
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
field core::int _field = #C2 /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
synthetic constructor •() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ method() → core::int
|
||||
return #C2;
|
||||
}
|
||||
@#C1
|
||||
extension Extension on core::int {
|
||||
method method = test::Extension|method;
|
||||
method tearoff method = test::Extension|get#method;
|
||||
static field _field = test::Extension|_field;
|
||||
}
|
||||
static field core::int Extension|_field = #C2 /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|method(lowered final core::int #this) → core::int
|
||||
return #C2;
|
||||
static extension-member method Extension|get#method(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::Extension|method(#this);
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
|
||||
static const field core::int value = #C2;
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
#C2 = 5
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
library;
|
||||
import self as self;
|
||||
|
||||
import "dart:test";
|
||||
|
||||
static method main() → dynamic
|
||||
;
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
import "org-dartlang-testcase:///main_lib.dart" as prefix;
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ _in::patch
|
||||
class Class extends core::Object {
|
||||
field core::int _field /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
synthetic constructor •() → self2::Class
|
||||
;
|
||||
@_in::patch
|
||||
external method method() → core::int;
|
||||
}
|
||||
@_in::patch
|
||||
extension Extension on core::int {
|
||||
method method = self2::Extension|method;
|
||||
method tearoff method = self2::Extension|get#method;
|
||||
static field _field = self2::Extension|_field;
|
||||
}
|
||||
static field core::int Extension|_field /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@_in::patch
|
||||
external static extension-member method Extension|method(lowered final core::int #this) → core::int;
|
||||
static extension-member method Extension|get#method(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => self2::Extension|method(#this);
|
||||
|
||||
library;
|
||||
import self as self3;
|
||||
import "dart:core" as core;
|
||||
|
||||
static const field core::int value = 5;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: FileUriExpression @ org-dartlang-testcase:///patch_lib.dart:9:1 -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ (unknown position in org-dartlang-testcase:///origin_lib.dart) -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ (unknown position in org-dartlang-testcase:///origin_lib.dart) -> InstanceConstant(const _Patch{})
|
||||
Evaluated: StaticGet @ (unknown position in org-dartlang-testcase:///origin_lib.dart) -> InstanceConstant(const _Patch{})
|
||||
Extra constant evaluation: evaluated: 7, effectively constant: 4
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
library;
|
||||
import self as self;
|
||||
import "dart:test" as test;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:test";
|
||||
|
||||
static method main() → dynamic {
|
||||
new test::Class::•().{test::Class::method}(){() → core::int};
|
||||
}
|
||||
|
||||
library;
|
||||
import self as test;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
import "dart:_internal";
|
||||
import "org-dartlang-testcase:///main_lib.dart" as prefix;
|
||||
|
||||
@/* from org-dartlang-testcase:///patch_lib.dart */ #C1
|
||||
class Class extends core::Object {
|
||||
field core::int _field = #C2 /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
synthetic constructor •() → test::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
@#C1
|
||||
method /* from org-dartlang-testcase:///patch_lib.dart */ method() → core::int
|
||||
return #C2;
|
||||
}
|
||||
@#C1
|
||||
extension Extension on core::int {
|
||||
method method = test::Extension|method;
|
||||
method tearoff method = test::Extension|get#method;
|
||||
static field _field = test::Extension|_field;
|
||||
}
|
||||
static field core::int Extension|_field = #C2 /* from org-dartlang-testcase:///patch_lib.dart */;
|
||||
@#C1
|
||||
static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|method(lowered final core::int #this) → core::int
|
||||
return #C2;
|
||||
static extension-member method Extension|get#method(lowered final core::int #this) → () → core::int
|
||||
return () → core::int => test::Extension|method(#this);
|
||||
|
||||
library;
|
||||
import self as self2;
|
||||
import "dart:core" as core;
|
||||
|
||||
static const field core::int value = #C2;
|
||||
|
||||
constants {
|
||||
#C1 = _in::_Patch {}
|
||||
#C2 = 5
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import 'dart:test';
|
||||
|
||||
main() {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import 'dart:test';
|
||||
|
||||
main() {}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user