mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 14:32:49 +00:00
[cfe] Support per folder experimental flags in testcases
Change-Id: Ia4d795959f6b192d83c97c45870c5fc59d406f4c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113824 Reviewed-by: Jens Johansen <jensj@google.com>
This commit is contained in:
parent
670d40d808
commit
91c8cf7167
|
@ -8,8 +8,9 @@ import 'dart:async' show Future;
|
|||
|
||||
import 'dart:convert' show jsonDecode;
|
||||
|
||||
import 'dart:io' show File, Platform;
|
||||
import 'dart:io' show Directory, File, Platform;
|
||||
|
||||
import 'package:front_end/src/api_prototype/compiler_options.dart';
|
||||
import 'package:kernel/ast.dart'
|
||||
show AwaitExpression, Component, Library, Node, Visitor;
|
||||
|
||||
|
@ -130,6 +131,14 @@ String generateExpectationName(bool legacyMode) {
|
|||
return legacyMode ? "legacy" : "strong";
|
||||
}
|
||||
|
||||
const String experimentalFlagOptions = '--enable-experiment=';
|
||||
|
||||
class TestOptions {
|
||||
final Map<ExperimentalFlag, bool> experimentalFlags;
|
||||
|
||||
TestOptions(this.experimentalFlags);
|
||||
}
|
||||
|
||||
class FastaContext extends ChainContext with MatchContext {
|
||||
final UriTranslator uriTranslator;
|
||||
final List<Step> steps;
|
||||
|
@ -143,6 +152,7 @@ class FastaContext extends ChainContext with MatchContext {
|
|||
final Map<Component, StringBuffer> componentToDiagnostics =
|
||||
<Component, StringBuffer>{};
|
||||
final Uri platformBinaries;
|
||||
final Map<Uri, TestOptions> _testOptions = {};
|
||||
|
||||
@override
|
||||
final bool updateExpectations;
|
||||
|
@ -203,6 +213,41 @@ class FastaContext extends ChainContext with MatchContext {
|
|||
}
|
||||
}
|
||||
|
||||
/// Computes the experimental flag for [description].
|
||||
///
|
||||
/// [forcedExperimentalFlags] is used to override the default flags for
|
||||
/// [description].
|
||||
Map<ExperimentalFlag, bool> computeExperimentalFlags(
|
||||
TestDescription description,
|
||||
Map<ExperimentalFlag, bool> forcedExperimentalFlags) {
|
||||
Directory directory = new File.fromUri(description.uri).parent;
|
||||
// TODO(johnniwinther): Support nested test folders?
|
||||
TestOptions testOptions = _testOptions[directory.uri];
|
||||
if (testOptions == null) {
|
||||
List<String> experimentalFlagsArguments = [];
|
||||
File optionsFile =
|
||||
new File.fromUri(directory.uri.resolve('test.options'));
|
||||
if (optionsFile.existsSync()) {
|
||||
for (String line in optionsFile.readAsStringSync().split('\n')) {
|
||||
// TODO(johnniwinther): Support more options if need.
|
||||
if (line.startsWith(experimentalFlagOptions)) {
|
||||
experimentalFlagsArguments =
|
||||
line.substring(experimentalFlagOptions.length).split('\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
testOptions = new TestOptions(parseExperimentalFlags(
|
||||
parseExperimentalArguments(experimentalFlagsArguments),
|
||||
onError: (String message) => throw new ArgumentError(message),
|
||||
onWarning: (String message) => throw new ArgumentError(message)));
|
||||
_testOptions[directory.uri] = testOptions;
|
||||
}
|
||||
Map<ExperimentalFlag, bool> flags =
|
||||
new Map.from(testOptions.experimentalFlags);
|
||||
flags.addAll(forcedExperimentalFlags);
|
||||
return flags;
|
||||
}
|
||||
|
||||
Expectation get verificationError => expectationSet["VerificationError"];
|
||||
|
||||
Future ensurePlatformUris() async {
|
||||
|
@ -249,16 +294,19 @@ class FastaContext extends ChainContext with MatchContext {
|
|||
Uri vm = Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
|
||||
Uri packages = Uri.base.resolve(".packages");
|
||||
bool legacyMode = environment.containsKey(LEGACY_MODE);
|
||||
Map<ExperimentalFlag, bool> experimentalFlags = <ExperimentalFlag, bool>{
|
||||
ExperimentalFlag.controlFlowCollections:
|
||||
environment["enableControlFlowCollections"] != "false" && !legacyMode,
|
||||
ExperimentalFlag.spreadCollections:
|
||||
environment["enableSpreadCollections"] != "false" && !legacyMode,
|
||||
ExperimentalFlag.extensionMethods:
|
||||
environment["enableExtensionMethods"] != "false" && !legacyMode,
|
||||
ExperimentalFlag.nonNullable:
|
||||
environment["enableNonNullable"] != "false" && !legacyMode,
|
||||
};
|
||||
Map<ExperimentalFlag, bool> experimentalFlags = <ExperimentalFlag, bool>{};
|
||||
|
||||
void addForcedExperimentalFlag(String name, ExperimentalFlag flag) {
|
||||
if (environment.containsKey(name)) {
|
||||
experimentalFlags[flag] = environment[name] == "true";
|
||||
}
|
||||
}
|
||||
|
||||
addForcedExperimentalFlag(
|
||||
"enableExtensionMethods", ExperimentalFlag.extensionMethods);
|
||||
addForcedExperimentalFlag(
|
||||
"enableNonNullable", ExperimentalFlag.nonNullable);
|
||||
|
||||
var options = new ProcessedOptions(
|
||||
options: new CompilerOptions()
|
||||
..onDiagnostic = (DiagnosticMessage message) {
|
||||
|
@ -354,7 +402,8 @@ class Outline extends Step<TestDescription, Component, FastaContext> {
|
|||
errors.writeAll(message.plainTextFormatted, "\n");
|
||||
}
|
||||
..environmentDefines = {}
|
||||
..experimentalFlags = context.experimentalFlags,
|
||||
..experimentalFlags = context.computeExperimentalFlags(
|
||||
description, context.experimentalFlags),
|
||||
inputs: <Uri>[description.uri]);
|
||||
return await CompilerContext.runWithOptions(options, (_) async {
|
||||
// Disable colors to ensure that expectation files are the same across
|
||||
|
|
|
@ -1059,12 +1059,14 @@ flux
|
|||
fold
|
||||
folded
|
||||
folder
|
||||
folders
|
||||
follow
|
||||
followed
|
||||
following
|
||||
follows
|
||||
for
|
||||
force
|
||||
forced
|
||||
forest
|
||||
forget
|
||||
fork
|
||||
|
|
|
@ -1,298 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:24: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:24: Error: 'Class' is already declared in this scope.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:5:7: Context: Previous declaration of 'Class'.
|
||||
// class Class {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:31: Error: Expected '{' before this.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:34: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:34: Error: 'GenericClass' is already declared in this scope.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:69:7: Context: Previous declaration of 'GenericClass'.
|
||||
// class GenericClass<T> {
|
||||
// ^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:1: Warning: Type 'extension' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:21: Warning: Type 'on' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:1: Warning: Type 'extension' not found.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:31: Warning: Type 'on' not found.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:1: Warning: 'extension' isn't a type.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:11:12: Warning: Getter not found: 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:15:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:19:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:23:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:26:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:26:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:26:27: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:27:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:27:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:27:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:28:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:28:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:28:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:29:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:29:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:29:26: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:3: Error: Expected ';' after this.
|
||||
// get property => this.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:3: Warning: Getter not found: 'get'.
|
||||
// get property => this.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:7: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// get property => this.field;
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:11:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:16: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get property => this.field;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:19: Error: Expected identifier, but got 'this'.
|
||||
// get property => this.field;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:33:3: Error: Unexpected token 'set'.
|
||||
// set property(value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:33:7: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// set property(value) {
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:11:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:34:5: Error: Expected identifier, but got 'this'.
|
||||
// this.field = value;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:75:12: Warning: Getter not found: 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:79:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:83:4: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:87:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:91:4: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:95:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:99:4: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:5: Error: Expected ';' after this.
|
||||
// T get property => this.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:9: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// T get property => this.field;
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:75:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:18: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// T get property => this.field;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:21: Error: Expected identifier, but got 'this'.
|
||||
// T get property => this.field;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:104:8: Error: Expected ';' after this.
|
||||
// void set property(T value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:104:12: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// void set property(T value) {
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:75:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:105:5: Error: Expected identifier, but got 'this'.
|
||||
// this.field = value;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:108:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:108:27: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:109:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:109:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:110:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:110:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:111:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:111:26: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:112:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:112:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:113:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:113:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:114:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:114:33: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -308,6 +14,198 @@ class GenericClass<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type Extension;
|
||||
static method GenericExtension<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension Extension on self::Class* {
|
||||
method readGetter = self::Extension|readGetter;
|
||||
method writeSetterRequired = self::Extension|writeSetterRequired;
|
||||
method writeSetterOptional = self::Extension|writeSetterOptional;
|
||||
method writeSetterNamed = self::Extension|writeSetterNamed;
|
||||
get tearOffGetterNoArgs = self::Extension|get#tearOffGetterNoArgs;
|
||||
get tearOffGetterRequired = self::Extension|get#tearOffGetterRequired;
|
||||
get tearOffGetterOptional = self::Extension|get#tearOffGetterOptional;
|
||||
get tearOffGetterNamed = self::Extension|get#tearOffGetterNamed;
|
||||
get property = self::Extension|get#property;
|
||||
method invocations = self::Extension|invocations;
|
||||
method tearOffs = self::Extension|tearOffs;
|
||||
method getterCalls = self::Extension|getterCalls;
|
||||
set property = self::Extension|set#property;
|
||||
}
|
||||
extension GenericExtension<T extends core::Object* = dynamic> on self::GenericClass<T*>* {
|
||||
method readGetter = self::GenericExtension|readGetter;
|
||||
method writeSetterRequired = self::GenericExtension|writeSetterRequired;
|
||||
method writeSetterOptional = self::GenericExtension|writeSetterOptional;
|
||||
method writeSetterNamed = self::GenericExtension|writeSetterNamed;
|
||||
method genericWriteSetterRequired = self::GenericExtension|genericWriteSetterRequired;
|
||||
method genericWriteSetterOptional = self::GenericExtension|genericWriteSetterOptional;
|
||||
method genericWriteSetterNamed = self::GenericExtension|genericWriteSetterNamed;
|
||||
get property = self::GenericExtension|get#property;
|
||||
get tearOffGetterNoArgs = self::GenericExtension|get#tearOffGetterNoArgs;
|
||||
get tearOffGetterRequired = self::GenericExtension|get#tearOffGetterRequired;
|
||||
get tearOffGetterOptional = self::GenericExtension|get#tearOffGetterOptional;
|
||||
get tearOffGetterNamed = self::GenericExtension|get#tearOffGetterNamed;
|
||||
get tearOffGetterGenericRequired = self::GenericExtension|get#tearOffGetterGenericRequired;
|
||||
get tearOffGetterGenericOptional = self::GenericExtension|get#tearOffGetterGenericOptional;
|
||||
get tearOffGetterGenericNamed = self::GenericExtension|get#tearOffGetterGenericNamed;
|
||||
method invocations = self::GenericExtension|invocations;
|
||||
method tearOffs = self::GenericExtension|tearOffs;
|
||||
method getterCalls = self::GenericExtension|getterCalls;
|
||||
set property = self::GenericExtension|set#property;
|
||||
}
|
||||
static method Extension|readGetter(final self::Class* #this) → dynamic {
|
||||
return self::Extension|get#property(#this);
|
||||
}
|
||||
static method Extension|writeSetterRequired(final self::Class* #this, dynamic value) → dynamic {
|
||||
self::Extension|set#property(#this, value);
|
||||
}
|
||||
static method Extension|writeSetterOptional(final self::Class* #this = #C1, [dynamic value = #C1]) → dynamic {
|
||||
self::Extension|set#property(#this, value);
|
||||
}
|
||||
static method Extension|writeSetterNamed(final self::Class* #this = #C1, {dynamic value = #C1}) → dynamic {
|
||||
self::Extension|set#property(#this, value);
|
||||
}
|
||||
static method Extension|get#tearOffGetterNoArgs(final self::Class* #this) → dynamic
|
||||
return () → dynamic => self::Extension|readGetter(#this);
|
||||
static method Extension|get#tearOffGetterRequired(final self::Class* #this) → dynamic
|
||||
return (dynamic value) → dynamic => self::Extension|writeSetterRequired(#this, value);
|
||||
static method Extension|get#tearOffGetterOptional(final self::Class* #this) → dynamic
|
||||
return ([dynamic value = #C1]) → dynamic => self::Extension|writeSetterOptional(#this, value);
|
||||
static method Extension|get#tearOffGetterNamed(final self::Class* #this) → dynamic
|
||||
return ({dynamic value = #C1}) → dynamic => self::Extension|writeSetterNamed(#this, value: value);
|
||||
static method Extension|get#property(final self::Class* #this) → dynamic
|
||||
return #this.field;
|
||||
static method Extension|set#property(final self::Class* #this, dynamic value) → void {
|
||||
#this.field = value;
|
||||
}
|
||||
static method Extension|invocations(final self::Class* #this, dynamic value) → dynamic {
|
||||
self::Extension|readGetter(#this);
|
||||
self::Extension|writeSetterRequired(#this, value);
|
||||
self::Extension|writeSetterOptional(#this);
|
||||
self::Extension|writeSetterOptional(#this, value);
|
||||
self::Extension|writeSetterNamed(#this);
|
||||
self::Extension|writeSetterNamed(#this, value: value);
|
||||
}
|
||||
static method Extension|tearOffs(final self::Class* #this, dynamic value) → dynamic {
|
||||
dynamic tearOffNoArgs = () → dynamic => self::Extension|readGetter(#this);
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = (dynamic value) → dynamic => self::Extension|writeSetterRequired(#this, value);
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = ([dynamic value = #C1]) → dynamic => self::Extension|writeSetterOptional(#this, value);
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = ({dynamic value = #C1}) → dynamic => self::Extension|writeSetterNamed(#this, value: value);
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
}
|
||||
static method Extension|getterCalls(final self::Class* #this, dynamic value) → dynamic {
|
||||
self::Extension|get#tearOffGetterNoArgs(#this).call();
|
||||
self::Extension|get#tearOffGetterRequired(#this).call(value);
|
||||
self::Extension|get#tearOffGetterOptional(#this).call();
|
||||
self::Extension|get#tearOffGetterOptional(#this).call(value);
|
||||
self::Extension|get#tearOffGetterNamed(#this).call();
|
||||
self::Extension|get#tearOffGetterNamed(#this).call(value: value);
|
||||
}
|
||||
static method GenericExtension|readGetter<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|readGetter::#T*>* #this) → self::GenericExtension|readGetter::#T* {
|
||||
return self::GenericExtension|get#property<self::GenericExtension|readGetter::#T*>(#this);
|
||||
}
|
||||
static method GenericExtension|writeSetterRequired<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|writeSetterRequired::#T*>* #this, self::GenericExtension|writeSetterRequired::#T* value) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|writeSetterRequired::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|writeSetterOptional<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|writeSetterOptional::#T*>* #this = #C1, [self::GenericExtension|writeSetterOptional::#T* value = #C1]) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|writeSetterOptional::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|writeSetterNamed<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|writeSetterNamed::#T*>* #this = #C1, {self::GenericExtension|writeSetterNamed::#T* value = #C1}) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|writeSetterNamed::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|genericWriteSetterRequired<#T extends core::Object* = dynamic, S extends self::GenericExtension|genericWriteSetterRequired::#T = dynamic>(final self::GenericClass<self::GenericExtension|genericWriteSetterRequired::#T*>* #this, self::GenericExtension|genericWriteSetterRequired::S value) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|genericWriteSetterRequired::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|genericWriteSetterOptional<#T extends core::Object* = dynamic, S extends self::GenericExtension|genericWriteSetterOptional::#T = dynamic>(final self::GenericClass<self::GenericExtension|genericWriteSetterOptional::#T*>* #this = #C1, [self::GenericExtension|genericWriteSetterOptional::S value = #C1]) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|genericWriteSetterOptional::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|genericWriteSetterNamed<#T extends core::Object* = dynamic, S extends self::GenericExtension|genericWriteSetterNamed::#T = dynamic>(final self::GenericClass<self::GenericExtension|genericWriteSetterNamed::#T*>* #this = #C1, {self::GenericExtension|genericWriteSetterNamed::S value = #C1}) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|genericWriteSetterNamed::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|get#property<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#property::#T*>* #this) → self::GenericExtension|get#property::#T*
|
||||
return #this.field;
|
||||
static method GenericExtension|set#property<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|set#property::#T*>* #this, self::GenericExtension|set#property::#T* value) → void {
|
||||
#this.field = value;
|
||||
}
|
||||
static method GenericExtension|get#tearOffGetterNoArgs<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterNoArgs::#T*>* #this) → dynamic
|
||||
return () → self::GenericExtension|get#tearOffGetterNoArgs::#T* => self::GenericExtension|readGetter<self::GenericExtension|get#tearOffGetterNoArgs::#T*>(#this);
|
||||
static method GenericExtension|get#tearOffGetterRequired<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterRequired::#T*>* #this) → dynamic
|
||||
return (self::GenericExtension|get#tearOffGetterRequired::#T* value) → dynamic => self::GenericExtension|writeSetterRequired<self::GenericExtension|get#tearOffGetterRequired::#T*>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterOptional<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterOptional::#T*>* #this) → dynamic
|
||||
return ([self::GenericExtension|get#tearOffGetterOptional::#T* value = #C1]) → dynamic => self::GenericExtension|writeSetterOptional<self::GenericExtension|get#tearOffGetterOptional::#T*>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterNamed<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterNamed::#T*>* #this) → dynamic
|
||||
return ({self::GenericExtension|get#tearOffGetterNamed::#T* value = #C1}) → dynamic => self::GenericExtension|writeSetterNamed<self::GenericExtension|get#tearOffGetterNamed::#T*>(#this, value: value);
|
||||
static method GenericExtension|get#tearOffGetterGenericRequired<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterGenericRequired::#T*>* #this) → dynamic
|
||||
return <S extends self::GenericExtension|get#tearOffGetterGenericRequired::#T* = dynamic>(S value) → dynamic => self::GenericExtension|genericWriteSetterRequired<self::GenericExtension|get#tearOffGetterGenericRequired::#T*, S>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterGenericOptional<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterGenericOptional::#T*>* #this) → dynamic
|
||||
return <S extends self::GenericExtension|get#tearOffGetterGenericOptional::#T* = dynamic>([S value = #C1]) → dynamic => self::GenericExtension|genericWriteSetterOptional<self::GenericExtension|get#tearOffGetterGenericOptional::#T*, S>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterGenericNamed<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterGenericNamed::#T*>* #this) → dynamic
|
||||
return <S extends self::GenericExtension|get#tearOffGetterGenericNamed::#T* = dynamic>({S value = #C1}) → dynamic => self::GenericExtension|genericWriteSetterNamed<self::GenericExtension|get#tearOffGetterGenericNamed::#T*, S>(#this, value: value);
|
||||
static method GenericExtension|invocations<#T extends core::Object* = dynamic, S extends self::GenericExtension|invocations::#T = dynamic>(final self::GenericClass<self::GenericExtension|invocations::#T*>* #this, self::GenericExtension|invocations::S value) → dynamic {
|
||||
self::GenericExtension|readGetter<self::GenericExtension|invocations::#T*>(#this);
|
||||
self::GenericExtension|writeSetterRequired<self::GenericExtension|invocations::#T*>(#this, value);
|
||||
self::GenericExtension|writeSetterOptional<self::GenericExtension|invocations::#T*>(#this);
|
||||
self::GenericExtension|writeSetterOptional<self::GenericExtension|invocations::#T*>(#this, value);
|
||||
self::GenericExtension|writeSetterNamed<self::GenericExtension|invocations::#T*>(#this);
|
||||
self::GenericExtension|writeSetterNamed<self::GenericExtension|invocations::#T*>(#this, value: value);
|
||||
}
|
||||
static method GenericExtension|tearOffs<#T extends core::Object* = dynamic, S extends self::GenericExtension|tearOffs::#T = dynamic>(final self::GenericClass<self::GenericExtension|tearOffs::#T*>* #this, self::GenericExtension|tearOffs::S value) → dynamic {
|
||||
dynamic tearOffNoArgs = () → self::GenericExtension|tearOffs::#T* => self::GenericExtension|readGetter<self::GenericExtension|tearOffs::#T*>(#this);
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = (self::GenericExtension|tearOffs::#T* value) → dynamic => self::GenericExtension|writeSetterRequired<self::GenericExtension|tearOffs::#T*>(#this, value);
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = ([self::GenericExtension|tearOffs::#T* value = #C1]) → dynamic => self::GenericExtension|writeSetterOptional<self::GenericExtension|tearOffs::#T*>(#this, value);
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = ({self::GenericExtension|tearOffs::#T* value = #C1}) → dynamic => self::GenericExtension|writeSetterNamed<self::GenericExtension|tearOffs::#T*>(#this, value: value);
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
dynamic genericTearOffRequired = <S extends self::GenericExtension|tearOffs::#T* = dynamic>(S value) → dynamic => self::GenericExtension|genericWriteSetterRequired<self::GenericExtension|tearOffs::#T*, S>(#this, value);
|
||||
genericTearOffRequired.call(value);
|
||||
genericTearOffRequired.call<self::GenericExtension|tearOffs::#T*>(value);
|
||||
genericTearOffRequired.call<self::GenericExtension|tearOffs::S>(value);
|
||||
dynamic genericTearOffOptional = <S extends self::GenericExtension|tearOffs::#T* = dynamic>([S value = #C1]) → dynamic => self::GenericExtension|genericWriteSetterOptional<self::GenericExtension|tearOffs::#T*, S>(#this, value);
|
||||
genericTearOffOptional.call();
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::#T*>();
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::S>();
|
||||
genericTearOffOptional.call(value);
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::#T*>(value);
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::S>(value);
|
||||
dynamic genericTearOffNamed = <S extends self::GenericExtension|tearOffs::#T* = dynamic>({S value = #C1}) → dynamic => self::GenericExtension|genericWriteSetterNamed<self::GenericExtension|tearOffs::#T*, S>(#this, value: value);
|
||||
genericTearOffNamed.call();
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::#T*>();
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::S>();
|
||||
genericTearOffNamed.call(value: value);
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::#T*>(value: value);
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::S>(value: value);
|
||||
}
|
||||
static method GenericExtension|getterCalls<#T extends core::Object* = dynamic, S extends self::GenericExtension|getterCalls::#T = dynamic>(final self::GenericClass<self::GenericExtension|getterCalls::#T*>* #this, self::GenericExtension|getterCalls::S value) → dynamic {
|
||||
self::GenericExtension|get#tearOffGetterNoArgs<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterRequired<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterOptional<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterOptional<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterNamed<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterNamed<self::GenericExtension|getterCalls::#T*>(#this).call(value: value);
|
||||
self::GenericExtension|get#tearOffGetterGenericRequired<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericRequired<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericRequired<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>();
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>();
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>();
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>();
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call(value: value);
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>(value: value);
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>(value: value);
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
}
|
||||
|
|
|
@ -1,298 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:24: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:24: Error: 'Class' is already declared in this scope.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:5:7: Context: Previous declaration of 'Class'.
|
||||
// class Class {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:31: Error: Expected '{' before this.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:34: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:34: Error: 'GenericClass' is already declared in this scope.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:69:7: Context: Previous declaration of 'GenericClass'.
|
||||
// class GenericClass<T> {
|
||||
// ^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:1: Warning: Type 'extension' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:21: Warning: Type 'on' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:1: Warning: Type 'extension' not found.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:73:31: Warning: Type 'on' not found.
|
||||
// extension GenericExtension<T> on GenericClass<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:9:1: Warning: 'extension' isn't a type.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:11:12: Warning: Getter not found: 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:15:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:19:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:23:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:26:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:26:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:26:27: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:27:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:27:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:27:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:28:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:28:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:28:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:29:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:29:3: Warning: Getter not found: 'get'.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:29:26: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:3: Error: Expected ';' after this.
|
||||
// get property => this.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:3: Warning: Getter not found: 'get'.
|
||||
// get property => this.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:7: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// get property => this.field;
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:11:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:16: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get property => this.field;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:31:19: Error: Expected identifier, but got 'this'.
|
||||
// get property => this.field;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:33:3: Error: Unexpected token 'set'.
|
||||
// set property(value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:33:7: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// set property(value) {
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:11:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:34:5: Error: Expected identifier, but got 'this'.
|
||||
// this.field = value;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:75:12: Warning: Getter not found: 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:79:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:83:4: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:87:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:91:4: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:95:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:99:4: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:5: Error: Expected ';' after this.
|
||||
// T get property => this.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:9: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// T get property => this.field;
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:75:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:18: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// T get property => this.field;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:102:21: Error: Expected identifier, but got 'this'.
|
||||
// T get property => this.field;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:104:8: Error: Expected ';' after this.
|
||||
// void set property(T value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:104:12: Error: Can't declare 'property' because it was already used in this scope.
|
||||
// void set property(T value) {
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:75:12: Context: Previous use of 'property'.
|
||||
// return property;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:105:5: Error: Expected identifier, but got 'this'.
|
||||
// this.field = value;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:108:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:108:27: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNoArgs => readGetter;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:109:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:109:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:110:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:110:29: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:111:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:111:26: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:112:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:112:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:113:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:113:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:114:3: Error: Expected ';' after this.
|
||||
// get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_instance_access.dart:114:33: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -308,6 +14,198 @@ class GenericClass<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type Extension;
|
||||
static method GenericExtension<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension Extension on self::Class* {
|
||||
method readGetter = self::Extension|readGetter;
|
||||
method writeSetterRequired = self::Extension|writeSetterRequired;
|
||||
method writeSetterOptional = self::Extension|writeSetterOptional;
|
||||
method writeSetterNamed = self::Extension|writeSetterNamed;
|
||||
get tearOffGetterNoArgs = self::Extension|get#tearOffGetterNoArgs;
|
||||
get tearOffGetterRequired = self::Extension|get#tearOffGetterRequired;
|
||||
get tearOffGetterOptional = self::Extension|get#tearOffGetterOptional;
|
||||
get tearOffGetterNamed = self::Extension|get#tearOffGetterNamed;
|
||||
get property = self::Extension|get#property;
|
||||
method invocations = self::Extension|invocations;
|
||||
method tearOffs = self::Extension|tearOffs;
|
||||
method getterCalls = self::Extension|getterCalls;
|
||||
set property = self::Extension|set#property;
|
||||
}
|
||||
extension GenericExtension<T extends core::Object* = dynamic> on self::GenericClass<T*>* {
|
||||
method readGetter = self::GenericExtension|readGetter;
|
||||
method writeSetterRequired = self::GenericExtension|writeSetterRequired;
|
||||
method writeSetterOptional = self::GenericExtension|writeSetterOptional;
|
||||
method writeSetterNamed = self::GenericExtension|writeSetterNamed;
|
||||
method genericWriteSetterRequired = self::GenericExtension|genericWriteSetterRequired;
|
||||
method genericWriteSetterOptional = self::GenericExtension|genericWriteSetterOptional;
|
||||
method genericWriteSetterNamed = self::GenericExtension|genericWriteSetterNamed;
|
||||
get property = self::GenericExtension|get#property;
|
||||
get tearOffGetterNoArgs = self::GenericExtension|get#tearOffGetterNoArgs;
|
||||
get tearOffGetterRequired = self::GenericExtension|get#tearOffGetterRequired;
|
||||
get tearOffGetterOptional = self::GenericExtension|get#tearOffGetterOptional;
|
||||
get tearOffGetterNamed = self::GenericExtension|get#tearOffGetterNamed;
|
||||
get tearOffGetterGenericRequired = self::GenericExtension|get#tearOffGetterGenericRequired;
|
||||
get tearOffGetterGenericOptional = self::GenericExtension|get#tearOffGetterGenericOptional;
|
||||
get tearOffGetterGenericNamed = self::GenericExtension|get#tearOffGetterGenericNamed;
|
||||
method invocations = self::GenericExtension|invocations;
|
||||
method tearOffs = self::GenericExtension|tearOffs;
|
||||
method getterCalls = self::GenericExtension|getterCalls;
|
||||
set property = self::GenericExtension|set#property;
|
||||
}
|
||||
static method Extension|readGetter(final self::Class* #this) → dynamic {
|
||||
return self::Extension|get#property(#this);
|
||||
}
|
||||
static method Extension|writeSetterRequired(final self::Class* #this, dynamic value) → dynamic {
|
||||
self::Extension|set#property(#this, value);
|
||||
}
|
||||
static method Extension|writeSetterOptional(final self::Class* #this = #C1, [dynamic value = #C1]) → dynamic {
|
||||
self::Extension|set#property(#this, value);
|
||||
}
|
||||
static method Extension|writeSetterNamed(final self::Class* #this = #C1, {dynamic value = #C1}) → dynamic {
|
||||
self::Extension|set#property(#this, value);
|
||||
}
|
||||
static method Extension|get#tearOffGetterNoArgs(final self::Class* #this) → dynamic
|
||||
return () → dynamic => self::Extension|readGetter(#this);
|
||||
static method Extension|get#tearOffGetterRequired(final self::Class* #this) → dynamic
|
||||
return (dynamic value) → dynamic => self::Extension|writeSetterRequired(#this, value);
|
||||
static method Extension|get#tearOffGetterOptional(final self::Class* #this) → dynamic
|
||||
return ([dynamic value = #C1]) → dynamic => self::Extension|writeSetterOptional(#this, value);
|
||||
static method Extension|get#tearOffGetterNamed(final self::Class* #this) → dynamic
|
||||
return ({dynamic value = #C1}) → dynamic => self::Extension|writeSetterNamed(#this, value: value);
|
||||
static method Extension|get#property(final self::Class* #this) → dynamic
|
||||
return #this.field;
|
||||
static method Extension|set#property(final self::Class* #this, dynamic value) → void {
|
||||
#this.field = value;
|
||||
}
|
||||
static method Extension|invocations(final self::Class* #this, dynamic value) → dynamic {
|
||||
self::Extension|readGetter(#this);
|
||||
self::Extension|writeSetterRequired(#this, value);
|
||||
self::Extension|writeSetterOptional(#this);
|
||||
self::Extension|writeSetterOptional(#this, value);
|
||||
self::Extension|writeSetterNamed(#this);
|
||||
self::Extension|writeSetterNamed(#this, value: value);
|
||||
}
|
||||
static method Extension|tearOffs(final self::Class* #this, dynamic value) → dynamic {
|
||||
dynamic tearOffNoArgs = () → dynamic => self::Extension|readGetter(#this);
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = (dynamic value) → dynamic => self::Extension|writeSetterRequired(#this, value);
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = ([dynamic value = #C1]) → dynamic => self::Extension|writeSetterOptional(#this, value);
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = ({dynamic value = #C1}) → dynamic => self::Extension|writeSetterNamed(#this, value: value);
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
}
|
||||
static method Extension|getterCalls(final self::Class* #this, dynamic value) → dynamic {
|
||||
self::Extension|get#tearOffGetterNoArgs(#this).call();
|
||||
self::Extension|get#tearOffGetterRequired(#this).call(value);
|
||||
self::Extension|get#tearOffGetterOptional(#this).call();
|
||||
self::Extension|get#tearOffGetterOptional(#this).call(value);
|
||||
self::Extension|get#tearOffGetterNamed(#this).call();
|
||||
self::Extension|get#tearOffGetterNamed(#this).call(value: value);
|
||||
}
|
||||
static method GenericExtension|readGetter<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|readGetter::#T*>* #this) → self::GenericExtension|readGetter::#T* {
|
||||
return self::GenericExtension|get#property<self::GenericExtension|readGetter::#T*>(#this);
|
||||
}
|
||||
static method GenericExtension|writeSetterRequired<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|writeSetterRequired::#T*>* #this, self::GenericExtension|writeSetterRequired::#T* value) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|writeSetterRequired::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|writeSetterOptional<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|writeSetterOptional::#T*>* #this = #C1, [self::GenericExtension|writeSetterOptional::#T* value = #C1]) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|writeSetterOptional::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|writeSetterNamed<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|writeSetterNamed::#T*>* #this = #C1, {self::GenericExtension|writeSetterNamed::#T* value = #C1}) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|writeSetterNamed::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|genericWriteSetterRequired<#T extends core::Object* = dynamic, S extends self::GenericExtension|genericWriteSetterRequired::#T = dynamic>(final self::GenericClass<self::GenericExtension|genericWriteSetterRequired::#T*>* #this, self::GenericExtension|genericWriteSetterRequired::S value) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|genericWriteSetterRequired::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|genericWriteSetterOptional<#T extends core::Object* = dynamic, S extends self::GenericExtension|genericWriteSetterOptional::#T = dynamic>(final self::GenericClass<self::GenericExtension|genericWriteSetterOptional::#T*>* #this = #C1, [self::GenericExtension|genericWriteSetterOptional::S value = #C1]) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|genericWriteSetterOptional::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|genericWriteSetterNamed<#T extends core::Object* = dynamic, S extends self::GenericExtension|genericWriteSetterNamed::#T = dynamic>(final self::GenericClass<self::GenericExtension|genericWriteSetterNamed::#T*>* #this = #C1, {self::GenericExtension|genericWriteSetterNamed::S value = #C1}) → dynamic {
|
||||
self::GenericExtension|set#property<self::GenericExtension|genericWriteSetterNamed::#T*>(#this, value);
|
||||
}
|
||||
static method GenericExtension|get#property<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#property::#T*>* #this) → self::GenericExtension|get#property::#T*
|
||||
return #this.field;
|
||||
static method GenericExtension|set#property<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|set#property::#T*>* #this, self::GenericExtension|set#property::#T* value) → void {
|
||||
#this.field = value;
|
||||
}
|
||||
static method GenericExtension|get#tearOffGetterNoArgs<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterNoArgs::#T*>* #this) → dynamic
|
||||
return () → self::GenericExtension|get#tearOffGetterNoArgs::#T* => self::GenericExtension|readGetter<self::GenericExtension|get#tearOffGetterNoArgs::#T*>(#this);
|
||||
static method GenericExtension|get#tearOffGetterRequired<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterRequired::#T*>* #this) → dynamic
|
||||
return (self::GenericExtension|get#tearOffGetterRequired::#T* value) → dynamic => self::GenericExtension|writeSetterRequired<self::GenericExtension|get#tearOffGetterRequired::#T*>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterOptional<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterOptional::#T*>* #this) → dynamic
|
||||
return ([self::GenericExtension|get#tearOffGetterOptional::#T* value = #C1]) → dynamic => self::GenericExtension|writeSetterOptional<self::GenericExtension|get#tearOffGetterOptional::#T*>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterNamed<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterNamed::#T*>* #this) → dynamic
|
||||
return ({self::GenericExtension|get#tearOffGetterNamed::#T* value = #C1}) → dynamic => self::GenericExtension|writeSetterNamed<self::GenericExtension|get#tearOffGetterNamed::#T*>(#this, value: value);
|
||||
static method GenericExtension|get#tearOffGetterGenericRequired<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterGenericRequired::#T*>* #this) → dynamic
|
||||
return <S extends self::GenericExtension|get#tearOffGetterGenericRequired::#T* = dynamic>(S value) → dynamic => self::GenericExtension|genericWriteSetterRequired<self::GenericExtension|get#tearOffGetterGenericRequired::#T*, S>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterGenericOptional<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterGenericOptional::#T*>* #this) → dynamic
|
||||
return <S extends self::GenericExtension|get#tearOffGetterGenericOptional::#T* = dynamic>([S value = #C1]) → dynamic => self::GenericExtension|genericWriteSetterOptional<self::GenericExtension|get#tearOffGetterGenericOptional::#T*, S>(#this, value);
|
||||
static method GenericExtension|get#tearOffGetterGenericNamed<#T extends core::Object* = dynamic>(final self::GenericClass<self::GenericExtension|get#tearOffGetterGenericNamed::#T*>* #this) → dynamic
|
||||
return <S extends self::GenericExtension|get#tearOffGetterGenericNamed::#T* = dynamic>({S value = #C1}) → dynamic => self::GenericExtension|genericWriteSetterNamed<self::GenericExtension|get#tearOffGetterGenericNamed::#T*, S>(#this, value: value);
|
||||
static method GenericExtension|invocations<#T extends core::Object* = dynamic, S extends self::GenericExtension|invocations::#T = dynamic>(final self::GenericClass<self::GenericExtension|invocations::#T*>* #this, self::GenericExtension|invocations::S value) → dynamic {
|
||||
self::GenericExtension|readGetter<self::GenericExtension|invocations::#T*>(#this);
|
||||
self::GenericExtension|writeSetterRequired<self::GenericExtension|invocations::#T*>(#this, value);
|
||||
self::GenericExtension|writeSetterOptional<self::GenericExtension|invocations::#T*>(#this);
|
||||
self::GenericExtension|writeSetterOptional<self::GenericExtension|invocations::#T*>(#this, value);
|
||||
self::GenericExtension|writeSetterNamed<self::GenericExtension|invocations::#T*>(#this);
|
||||
self::GenericExtension|writeSetterNamed<self::GenericExtension|invocations::#T*>(#this, value: value);
|
||||
}
|
||||
static method GenericExtension|tearOffs<#T extends core::Object* = dynamic, S extends self::GenericExtension|tearOffs::#T = dynamic>(final self::GenericClass<self::GenericExtension|tearOffs::#T*>* #this, self::GenericExtension|tearOffs::S value) → dynamic {
|
||||
dynamic tearOffNoArgs = () → self::GenericExtension|tearOffs::#T* => self::GenericExtension|readGetter<self::GenericExtension|tearOffs::#T*>(#this);
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = (self::GenericExtension|tearOffs::#T* value) → dynamic => self::GenericExtension|writeSetterRequired<self::GenericExtension|tearOffs::#T*>(#this, value);
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = ([self::GenericExtension|tearOffs::#T* value = #C1]) → dynamic => self::GenericExtension|writeSetterOptional<self::GenericExtension|tearOffs::#T*>(#this, value);
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = ({self::GenericExtension|tearOffs::#T* value = #C1}) → dynamic => self::GenericExtension|writeSetterNamed<self::GenericExtension|tearOffs::#T*>(#this, value: value);
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
dynamic genericTearOffRequired = <S extends self::GenericExtension|tearOffs::#T* = dynamic>(S value) → dynamic => self::GenericExtension|genericWriteSetterRequired<self::GenericExtension|tearOffs::#T*, S>(#this, value);
|
||||
genericTearOffRequired.call(value);
|
||||
genericTearOffRequired.call<self::GenericExtension|tearOffs::#T*>(value);
|
||||
genericTearOffRequired.call<self::GenericExtension|tearOffs::S>(value);
|
||||
dynamic genericTearOffOptional = <S extends self::GenericExtension|tearOffs::#T* = dynamic>([S value = #C1]) → dynamic => self::GenericExtension|genericWriteSetterOptional<self::GenericExtension|tearOffs::#T*, S>(#this, value);
|
||||
genericTearOffOptional.call();
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::#T*>();
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::S>();
|
||||
genericTearOffOptional.call(value);
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::#T*>(value);
|
||||
genericTearOffOptional.call<self::GenericExtension|tearOffs::S>(value);
|
||||
dynamic genericTearOffNamed = <S extends self::GenericExtension|tearOffs::#T* = dynamic>({S value = #C1}) → dynamic => self::GenericExtension|genericWriteSetterNamed<self::GenericExtension|tearOffs::#T*, S>(#this, value: value);
|
||||
genericTearOffNamed.call();
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::#T*>();
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::S>();
|
||||
genericTearOffNamed.call(value: value);
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::#T*>(value: value);
|
||||
genericTearOffNamed.call<self::GenericExtension|tearOffs::S>(value: value);
|
||||
}
|
||||
static method GenericExtension|getterCalls<#T extends core::Object* = dynamic, S extends self::GenericExtension|getterCalls::#T = dynamic>(final self::GenericClass<self::GenericExtension|getterCalls::#T*>* #this, self::GenericExtension|getterCalls::S value) → dynamic {
|
||||
self::GenericExtension|get#tearOffGetterNoArgs<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterRequired<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterOptional<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterOptional<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterNamed<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterNamed<self::GenericExtension|getterCalls::#T*>(#this).call(value: value);
|
||||
self::GenericExtension|get#tearOffGetterGenericRequired<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericRequired<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericRequired<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>();
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>();
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericOptional<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>(value);
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call();
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>();
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>();
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call(value: value);
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::#T*>(value: value);
|
||||
self::GenericExtension|get#tearOffGetterGenericNamed<self::GenericExtension|getterCalls::#T*>(#this).call<self::GenericExtension|getterCalls::S>(value: value);
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
}
|
||||
|
|
|
@ -1,358 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:24: Error: Expected '{' before this.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:27: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:27: Error: 'Class' is already declared in this scope.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:5:7: Context: Previous declaration of 'Class'.
|
||||
// class Class<T> {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:1: Warning: Type 'extension' not found.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:24: Warning: Type 'on' not found.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get property => Class.field;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Error: Expected ';' after this.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:23: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get property => Class.field;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:26: Error: Can't use 'Class' because it is declared more than once.
|
||||
// static get property => Class.field;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static set property(value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static set property(value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:10: Error: Expected ';' after this.
|
||||
// static set property(value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:14: Error: 'property' is already declared in this scope.
|
||||
// static set property(value) {
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:14: Context: Previous declaration of 'property'.
|
||||
// static get property => Class.field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:14:5: Error: Can't use 'Class' because it is declared more than once.
|
||||
// Class.field = value;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:17:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static var field;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:19:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static readGetter() {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:23:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static writeSetterRequired(value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:24:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:27:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static writeSetterOptional([value]) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:28:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:31:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static writeSetterNamed({value}) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:32:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:35:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericWriteSetterRequired<S>(S value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:36:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:39:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericWriteSetterOptional<S>([S value]) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:40:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:43:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericWriteSetterNamed<S>({S value}) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:44:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:34: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:33: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:43: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:43: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:40: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:55:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static invocationsFromStaticContext(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:74:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static tearOffsFromStaticContext(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:100:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static fieldAccessFromStaticContext() {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:102:5: Warning: Setter not found: 'property'.
|
||||
// property = field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:105:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static getterCallsFromStaticContext(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:171:5: Warning: Setter not found: 'property'.
|
||||
// property = field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -362,5 +8,213 @@ class Class<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static method Extension<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension Extension<T extends core::Object* = dynamic> on self::Class<T*>* {
|
||||
static get property = get self::Extension|property;
|
||||
static field field = self::Extension|field;
|
||||
static method readGetter = self::Extension|readGetter;
|
||||
static method writeSetterRequired = self::Extension|writeSetterRequired;
|
||||
static method writeSetterOptional = self::Extension|writeSetterOptional;
|
||||
static method writeSetterNamed = self::Extension|writeSetterNamed;
|
||||
static method genericWriteSetterRequired = self::Extension|genericWriteSetterRequired;
|
||||
static method genericWriteSetterOptional = self::Extension|genericWriteSetterOptional;
|
||||
static method genericWriteSetterNamed = self::Extension|genericWriteSetterNamed;
|
||||
static get tearOffGetterNoArgs = get self::Extension|tearOffGetterNoArgs;
|
||||
static get tearOffGetterRequired = get self::Extension|tearOffGetterRequired;
|
||||
static get tearOffGetterOptional = get self::Extension|tearOffGetterOptional;
|
||||
static get tearOffGetterNamed = get self::Extension|tearOffGetterNamed;
|
||||
static get tearOffGetterGenericRequired = get self::Extension|tearOffGetterGenericRequired;
|
||||
static get tearOffGetterGenericOptional = get self::Extension|tearOffGetterGenericOptional;
|
||||
static get tearOffGetterGenericNamed = get self::Extension|tearOffGetterGenericNamed;
|
||||
static method invocationsFromStaticContext = self::Extension|invocationsFromStaticContext;
|
||||
static method tearOffsFromStaticContext = self::Extension|tearOffsFromStaticContext;
|
||||
static method fieldAccessFromStaticContext = self::Extension|fieldAccessFromStaticContext;
|
||||
static method getterCallsFromStaticContext = self::Extension|getterCallsFromStaticContext;
|
||||
method invocationsFromInstanceContext = self::Extension|invocationsFromInstanceContext;
|
||||
method tearOffsFromInstanceContext = self::Extension|tearOffsFromInstanceContext;
|
||||
method fieldAccessFromInstanceContext = self::Extension|fieldAccessFromInstanceContext;
|
||||
method getterCallsFromInstanceContext = self::Extension|getterCallsFromInstanceContext;
|
||||
static set property = set self::Extension|property;
|
||||
}
|
||||
static field dynamic Extension|field;
|
||||
static get Extension|property() → dynamic
|
||||
return self::Class::field;
|
||||
static set Extension|property(dynamic value) → void {
|
||||
self::Class::field = value;
|
||||
}
|
||||
static method Extension|readGetter() → dynamic {
|
||||
return self::Extension|property;
|
||||
}
|
||||
static method Extension|writeSetterRequired(dynamic value) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|writeSetterOptional([dynamic value = #C1]) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|writeSetterNamed({dynamic value = #C1}) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|genericWriteSetterRequired<S extends core::Object* = dynamic>(self::Extension|genericWriteSetterRequired::S* value) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|genericWriteSetterOptional<S extends core::Object* = dynamic>([self::Extension|genericWriteSetterOptional::S* value = #C1]) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|genericWriteSetterNamed<S extends core::Object* = dynamic>({self::Extension|genericWriteSetterNamed::S* value = #C1}) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static get Extension|tearOffGetterNoArgs() → dynamic
|
||||
return #C2;
|
||||
static get Extension|tearOffGetterRequired() → dynamic
|
||||
return #C3;
|
||||
static get Extension|tearOffGetterOptional() → dynamic
|
||||
return #C4;
|
||||
static get Extension|tearOffGetterNamed() → dynamic
|
||||
return #C5;
|
||||
static get Extension|tearOffGetterGenericRequired() → dynamic
|
||||
return #C6;
|
||||
static get Extension|tearOffGetterGenericOptional() → dynamic
|
||||
return #C7;
|
||||
static get Extension|tearOffGetterGenericNamed() → dynamic
|
||||
return #C8;
|
||||
static method Extension|invocationsFromStaticContext(core::int* value) → dynamic {
|
||||
self::Extension|readGetter();
|
||||
self::Extension|writeSetterRequired(value);
|
||||
self::Extension|writeSetterOptional();
|
||||
self::Extension|writeSetterOptional(value);
|
||||
self::Extension|writeSetterNamed();
|
||||
self::Extension|writeSetterNamed(value: value);
|
||||
self::Extension|genericWriteSetterRequired<dynamic>(value);
|
||||
self::Extension|genericWriteSetterRequired<core::int*>(value);
|
||||
self::Extension|genericWriteSetterOptional<dynamic>();
|
||||
self::Extension|genericWriteSetterOptional<core::int*>();
|
||||
self::Extension|genericWriteSetterOptional<dynamic>(value);
|
||||
self::Extension|genericWriteSetterOptional<core::int*>(value);
|
||||
self::Extension|genericWriteSetterNamed<dynamic>();
|
||||
self::Extension|genericWriteSetterNamed<core::int*>();
|
||||
self::Extension|genericWriteSetterNamed<dynamic>(value: value);
|
||||
self::Extension|genericWriteSetterNamed<core::int*>(value: value);
|
||||
}
|
||||
static method Extension|tearOffsFromStaticContext(core::int* value) → dynamic {
|
||||
dynamic tearOffNoArgs = #C2;
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = #C3;
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = #C4;
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = #C5;
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
dynamic tearOffGenericRequired = #C6;
|
||||
tearOffGenericRequired.call(value);
|
||||
tearOffGenericRequired.call<core::int*>(value);
|
||||
dynamic tearOffGenericOptional = #C7;
|
||||
tearOffGenericOptional.call();
|
||||
tearOffGenericOptional.call<core::int*>();
|
||||
tearOffGenericOptional.call(value);
|
||||
tearOffGenericOptional.call<core::int*>(value);
|
||||
dynamic tearOffGenericNamed = #C8;
|
||||
tearOffGenericNamed.call();
|
||||
tearOffGenericNamed.call<core::int*>();
|
||||
tearOffGenericNamed.call(value: value);
|
||||
tearOffGenericNamed.call<core::int*>(value: value);
|
||||
}
|
||||
static method Extension|fieldAccessFromStaticContext() → dynamic {
|
||||
self::Extension|field = self::Extension|property;
|
||||
self::Extension|property = self::Extension|field;
|
||||
}
|
||||
static method Extension|getterCallsFromStaticContext(core::int* value) → dynamic {
|
||||
self::Extension|tearOffGetterNoArgs.call();
|
||||
self::Extension|tearOffGetterRequired.call(value);
|
||||
self::Extension|tearOffGetterOptional.call();
|
||||
self::Extension|tearOffGetterOptional.call(value);
|
||||
self::Extension|tearOffGetterNamed.call();
|
||||
self::Extension|tearOffGetterNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericRequired.call(value);
|
||||
self::Extension|tearOffGetterGenericRequired.call<core::int*>(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call();
|
||||
self::Extension|tearOffGetterGenericOptional.call<core::int*>();
|
||||
self::Extension|tearOffGetterGenericOptional.call(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call<core::int*>(value);
|
||||
self::Extension|tearOffGetterGenericNamed.call();
|
||||
self::Extension|tearOffGetterGenericNamed.call<core::int*>();
|
||||
self::Extension|tearOffGetterGenericNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericNamed.call<core::int*>(value: value);
|
||||
}
|
||||
static method Extension|invocationsFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|invocationsFromInstanceContext::#T*>* #this, self::Extension|invocationsFromInstanceContext::#T* value) → dynamic {
|
||||
self::Extension|readGetter();
|
||||
self::Extension|writeSetterRequired(value);
|
||||
self::Extension|writeSetterOptional();
|
||||
self::Extension|writeSetterOptional(value);
|
||||
self::Extension|writeSetterNamed();
|
||||
self::Extension|writeSetterNamed(value: value);
|
||||
self::Extension|genericWriteSetterRequired<dynamic>(value);
|
||||
self::Extension|genericWriteSetterRequired<self::Extension|invocationsFromInstanceContext::#T*>(value);
|
||||
self::Extension|genericWriteSetterOptional<dynamic>();
|
||||
self::Extension|genericWriteSetterOptional<self::Extension|invocationsFromInstanceContext::#T*>();
|
||||
self::Extension|genericWriteSetterOptional<dynamic>(value);
|
||||
self::Extension|genericWriteSetterOptional<self::Extension|invocationsFromInstanceContext::#T*>(value);
|
||||
self::Extension|genericWriteSetterNamed<dynamic>();
|
||||
self::Extension|genericWriteSetterNamed<self::Extension|invocationsFromInstanceContext::#T*>();
|
||||
self::Extension|genericWriteSetterNamed<dynamic>(value: value);
|
||||
self::Extension|genericWriteSetterNamed<self::Extension|invocationsFromInstanceContext::#T*>(value: value);
|
||||
}
|
||||
static method Extension|tearOffsFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|tearOffsFromInstanceContext::#T*>* #this, self::Extension|tearOffsFromInstanceContext::#T* value) → dynamic {
|
||||
dynamic tearOffNoArgs = #C2;
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = #C3;
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = #C4;
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = #C5;
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
dynamic tearOffGenericRequired = #C6;
|
||||
tearOffGenericRequired.call(value);
|
||||
tearOffGenericRequired.call<self::Extension|tearOffsFromInstanceContext::#T*>(value);
|
||||
dynamic tearOffGenericOptional = #C7;
|
||||
tearOffGenericOptional.call();
|
||||
tearOffGenericOptional.call<self::Extension|tearOffsFromInstanceContext::#T*>();
|
||||
tearOffGenericOptional.call(value);
|
||||
tearOffGenericOptional.call<self::Extension|tearOffsFromInstanceContext::#T*>(value);
|
||||
dynamic tearOffGenericNamed = #C8;
|
||||
tearOffGenericNamed.call();
|
||||
tearOffGenericNamed.call<self::Extension|tearOffsFromInstanceContext::#T*>();
|
||||
tearOffGenericNamed.call(value: value);
|
||||
tearOffGenericNamed.call<self::Extension|tearOffsFromInstanceContext::#T*>(value: value);
|
||||
}
|
||||
static method Extension|fieldAccessFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|fieldAccessFromInstanceContext::#T*>* #this) → dynamic {
|
||||
self::Extension|field = self::Extension|property;
|
||||
self::Extension|property = self::Extension|field;
|
||||
}
|
||||
static method Extension|getterCallsFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|getterCallsFromInstanceContext::#T*>* #this, self::Extension|getterCallsFromInstanceContext::#T* value) → dynamic {
|
||||
self::Extension|tearOffGetterNoArgs.call();
|
||||
self::Extension|tearOffGetterRequired.call(value);
|
||||
self::Extension|tearOffGetterOptional.call();
|
||||
self::Extension|tearOffGetterOptional.call(value);
|
||||
self::Extension|tearOffGetterNamed.call();
|
||||
self::Extension|tearOffGetterNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericRequired.call(value);
|
||||
self::Extension|tearOffGetterGenericRequired.call<self::Extension|getterCallsFromInstanceContext::#T*>(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call();
|
||||
self::Extension|tearOffGetterGenericOptional.call<self::Extension|getterCallsFromInstanceContext::#T*>();
|
||||
self::Extension|tearOffGetterGenericOptional.call(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call<self::Extension|getterCallsFromInstanceContext::#T*>(value);
|
||||
self::Extension|tearOffGetterGenericNamed.call();
|
||||
self::Extension|tearOffGetterGenericNamed.call<self::Extension|getterCallsFromInstanceContext::#T*>();
|
||||
self::Extension|tearOffGetterGenericNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericNamed.call<self::Extension|getterCallsFromInstanceContext::#T*>(value: value);
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
#C2 = tearoff self::Extension|readGetter
|
||||
#C3 = tearoff self::Extension|writeSetterRequired
|
||||
#C4 = tearoff self::Extension|writeSetterOptional
|
||||
#C5 = tearoff self::Extension|writeSetterNamed
|
||||
#C6 = tearoff self::Extension|genericWriteSetterRequired
|
||||
#C7 = tearoff self::Extension|genericWriteSetterOptional
|
||||
#C8 = tearoff self::Extension|genericWriteSetterNamed
|
||||
}
|
||||
|
|
|
@ -1,358 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:24: Error: Expected '{' before this.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:27: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:27: Error: 'Class' is already declared in this scope.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:5:7: Context: Previous declaration of 'Class'.
|
||||
// class Class<T> {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:1: Warning: Type 'extension' not found.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:9:24: Warning: Type 'on' not found.
|
||||
// extension Extension<T> on Class<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get property => Class.field;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Error: Expected ';' after this.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:23: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get property => Class.field;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:26: Error: Can't use 'Class' because it is declared more than once.
|
||||
// static get property => Class.field;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static set property(value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static set property(value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:10: Error: Expected ';' after this.
|
||||
// static set property(value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:13:14: Error: 'property' is already declared in this scope.
|
||||
// static set property(value) {
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:14: Context: Previous declaration of 'property'.
|
||||
// static get property => Class.field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:14:5: Error: Can't use 'Class' because it is declared more than once.
|
||||
// Class.field = value;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:17:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static var field;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:19:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static readGetter() {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:23:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static writeSetterRequired(value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:24:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:27:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static writeSetterOptional([value]) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:28:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:31:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static writeSetterNamed({value}) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:32:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:35:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericWriteSetterRequired<S>(S value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:36:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:39:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericWriteSetterOptional<S>([S value]) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:40:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:43:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericWriteSetterNamed<S>({S value}) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:44:5: Warning: Setter not found: 'property'.
|
||||
// property = value;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:47:34: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterNoArgs => readGetter;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:48:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterRequired => writeSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:49:36: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterOptional => writeSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:50:33: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterNamed => writeSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:51:43: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterGenericRequired => genericWriteSetterRequired;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:52:43: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterGenericOptional => genericWriteSetterOptional;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:10: Error: 'get' is already declared in this scope.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:11:10: Context: Previous declaration of 'get'.
|
||||
// static get property => Class.field;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:10: Error: Expected ';' after this.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:53:40: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get tearOffGetterGenericNamed => genericWriteSetterNamed;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:55:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static invocationsFromStaticContext(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:74:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static tearOffsFromStaticContext(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:100:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static fieldAccessFromStaticContext() {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:102:5: Warning: Setter not found: 'property'.
|
||||
// property = field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:105:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static getterCallsFromStaticContext(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/direct_static_access.dart:171:5: Warning: Setter not found: 'property'.
|
||||
// property = field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -362,5 +8,213 @@ class Class<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static method Extension<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension Extension<T extends core::Object* = dynamic> on self::Class<T*>* {
|
||||
static get property = get self::Extension|property;
|
||||
static field field = self::Extension|field;
|
||||
static method readGetter = self::Extension|readGetter;
|
||||
static method writeSetterRequired = self::Extension|writeSetterRequired;
|
||||
static method writeSetterOptional = self::Extension|writeSetterOptional;
|
||||
static method writeSetterNamed = self::Extension|writeSetterNamed;
|
||||
static method genericWriteSetterRequired = self::Extension|genericWriteSetterRequired;
|
||||
static method genericWriteSetterOptional = self::Extension|genericWriteSetterOptional;
|
||||
static method genericWriteSetterNamed = self::Extension|genericWriteSetterNamed;
|
||||
static get tearOffGetterNoArgs = get self::Extension|tearOffGetterNoArgs;
|
||||
static get tearOffGetterRequired = get self::Extension|tearOffGetterRequired;
|
||||
static get tearOffGetterOptional = get self::Extension|tearOffGetterOptional;
|
||||
static get tearOffGetterNamed = get self::Extension|tearOffGetterNamed;
|
||||
static get tearOffGetterGenericRequired = get self::Extension|tearOffGetterGenericRequired;
|
||||
static get tearOffGetterGenericOptional = get self::Extension|tearOffGetterGenericOptional;
|
||||
static get tearOffGetterGenericNamed = get self::Extension|tearOffGetterGenericNamed;
|
||||
static method invocationsFromStaticContext = self::Extension|invocationsFromStaticContext;
|
||||
static method tearOffsFromStaticContext = self::Extension|tearOffsFromStaticContext;
|
||||
static method fieldAccessFromStaticContext = self::Extension|fieldAccessFromStaticContext;
|
||||
static method getterCallsFromStaticContext = self::Extension|getterCallsFromStaticContext;
|
||||
method invocationsFromInstanceContext = self::Extension|invocationsFromInstanceContext;
|
||||
method tearOffsFromInstanceContext = self::Extension|tearOffsFromInstanceContext;
|
||||
method fieldAccessFromInstanceContext = self::Extension|fieldAccessFromInstanceContext;
|
||||
method getterCallsFromInstanceContext = self::Extension|getterCallsFromInstanceContext;
|
||||
static set property = set self::Extension|property;
|
||||
}
|
||||
static field dynamic Extension|field;
|
||||
static get Extension|property() → dynamic
|
||||
return self::Class::field;
|
||||
static set Extension|property(dynamic value) → void {
|
||||
self::Class::field = value;
|
||||
}
|
||||
static method Extension|readGetter() → dynamic {
|
||||
return self::Extension|property;
|
||||
}
|
||||
static method Extension|writeSetterRequired(dynamic value) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|writeSetterOptional([dynamic value = #C1]) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|writeSetterNamed({dynamic value = #C1}) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|genericWriteSetterRequired<S extends core::Object* = dynamic>(self::Extension|genericWriteSetterRequired::S* value) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|genericWriteSetterOptional<S extends core::Object* = dynamic>([self::Extension|genericWriteSetterOptional::S* value = #C1]) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static method Extension|genericWriteSetterNamed<S extends core::Object* = dynamic>({self::Extension|genericWriteSetterNamed::S* value = #C1}) → dynamic {
|
||||
self::Extension|property = value;
|
||||
}
|
||||
static get Extension|tearOffGetterNoArgs() → dynamic
|
||||
return #C2;
|
||||
static get Extension|tearOffGetterRequired() → dynamic
|
||||
return #C3;
|
||||
static get Extension|tearOffGetterOptional() → dynamic
|
||||
return #C4;
|
||||
static get Extension|tearOffGetterNamed() → dynamic
|
||||
return #C5;
|
||||
static get Extension|tearOffGetterGenericRequired() → dynamic
|
||||
return #C6;
|
||||
static get Extension|tearOffGetterGenericOptional() → dynamic
|
||||
return #C7;
|
||||
static get Extension|tearOffGetterGenericNamed() → dynamic
|
||||
return #C8;
|
||||
static method Extension|invocationsFromStaticContext(core::int* value) → dynamic {
|
||||
self::Extension|readGetter();
|
||||
self::Extension|writeSetterRequired(value);
|
||||
self::Extension|writeSetterOptional();
|
||||
self::Extension|writeSetterOptional(value);
|
||||
self::Extension|writeSetterNamed();
|
||||
self::Extension|writeSetterNamed(value: value);
|
||||
self::Extension|genericWriteSetterRequired<dynamic>(value);
|
||||
self::Extension|genericWriteSetterRequired<core::int*>(value);
|
||||
self::Extension|genericWriteSetterOptional<dynamic>();
|
||||
self::Extension|genericWriteSetterOptional<core::int*>();
|
||||
self::Extension|genericWriteSetterOptional<dynamic>(value);
|
||||
self::Extension|genericWriteSetterOptional<core::int*>(value);
|
||||
self::Extension|genericWriteSetterNamed<dynamic>();
|
||||
self::Extension|genericWriteSetterNamed<core::int*>();
|
||||
self::Extension|genericWriteSetterNamed<dynamic>(value: value);
|
||||
self::Extension|genericWriteSetterNamed<core::int*>(value: value);
|
||||
}
|
||||
static method Extension|tearOffsFromStaticContext(core::int* value) → dynamic {
|
||||
dynamic tearOffNoArgs = #C2;
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = #C3;
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = #C4;
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = #C5;
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
dynamic tearOffGenericRequired = #C6;
|
||||
tearOffGenericRequired.call(value);
|
||||
tearOffGenericRequired.call<core::int*>(value);
|
||||
dynamic tearOffGenericOptional = #C7;
|
||||
tearOffGenericOptional.call();
|
||||
tearOffGenericOptional.call<core::int*>();
|
||||
tearOffGenericOptional.call(value);
|
||||
tearOffGenericOptional.call<core::int*>(value);
|
||||
dynamic tearOffGenericNamed = #C8;
|
||||
tearOffGenericNamed.call();
|
||||
tearOffGenericNamed.call<core::int*>();
|
||||
tearOffGenericNamed.call(value: value);
|
||||
tearOffGenericNamed.call<core::int*>(value: value);
|
||||
}
|
||||
static method Extension|fieldAccessFromStaticContext() → dynamic {
|
||||
self::Extension|field = self::Extension|property;
|
||||
self::Extension|property = self::Extension|field;
|
||||
}
|
||||
static method Extension|getterCallsFromStaticContext(core::int* value) → dynamic {
|
||||
self::Extension|tearOffGetterNoArgs.call();
|
||||
self::Extension|tearOffGetterRequired.call(value);
|
||||
self::Extension|tearOffGetterOptional.call();
|
||||
self::Extension|tearOffGetterOptional.call(value);
|
||||
self::Extension|tearOffGetterNamed.call();
|
||||
self::Extension|tearOffGetterNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericRequired.call(value);
|
||||
self::Extension|tearOffGetterGenericRequired.call<core::int*>(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call();
|
||||
self::Extension|tearOffGetterGenericOptional.call<core::int*>();
|
||||
self::Extension|tearOffGetterGenericOptional.call(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call<core::int*>(value);
|
||||
self::Extension|tearOffGetterGenericNamed.call();
|
||||
self::Extension|tearOffGetterGenericNamed.call<core::int*>();
|
||||
self::Extension|tearOffGetterGenericNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericNamed.call<core::int*>(value: value);
|
||||
}
|
||||
static method Extension|invocationsFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|invocationsFromInstanceContext::#T*>* #this, self::Extension|invocationsFromInstanceContext::#T* value) → dynamic {
|
||||
self::Extension|readGetter();
|
||||
self::Extension|writeSetterRequired(value);
|
||||
self::Extension|writeSetterOptional();
|
||||
self::Extension|writeSetterOptional(value);
|
||||
self::Extension|writeSetterNamed();
|
||||
self::Extension|writeSetterNamed(value: value);
|
||||
self::Extension|genericWriteSetterRequired<dynamic>(value);
|
||||
self::Extension|genericWriteSetterRequired<self::Extension|invocationsFromInstanceContext::#T*>(value);
|
||||
self::Extension|genericWriteSetterOptional<dynamic>();
|
||||
self::Extension|genericWriteSetterOptional<self::Extension|invocationsFromInstanceContext::#T*>();
|
||||
self::Extension|genericWriteSetterOptional<dynamic>(value);
|
||||
self::Extension|genericWriteSetterOptional<self::Extension|invocationsFromInstanceContext::#T*>(value);
|
||||
self::Extension|genericWriteSetterNamed<dynamic>();
|
||||
self::Extension|genericWriteSetterNamed<self::Extension|invocationsFromInstanceContext::#T*>();
|
||||
self::Extension|genericWriteSetterNamed<dynamic>(value: value);
|
||||
self::Extension|genericWriteSetterNamed<self::Extension|invocationsFromInstanceContext::#T*>(value: value);
|
||||
}
|
||||
static method Extension|tearOffsFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|tearOffsFromInstanceContext::#T*>* #this, self::Extension|tearOffsFromInstanceContext::#T* value) → dynamic {
|
||||
dynamic tearOffNoArgs = #C2;
|
||||
tearOffNoArgs.call();
|
||||
dynamic tearOffRequired = #C3;
|
||||
tearOffRequired.call(value);
|
||||
dynamic tearOffOptional = #C4;
|
||||
tearOffOptional.call();
|
||||
tearOffOptional.call(value);
|
||||
dynamic tearOffNamed = #C5;
|
||||
tearOffNamed.call();
|
||||
tearOffNamed.call(value: value);
|
||||
dynamic tearOffGenericRequired = #C6;
|
||||
tearOffGenericRequired.call(value);
|
||||
tearOffGenericRequired.call<self::Extension|tearOffsFromInstanceContext::#T*>(value);
|
||||
dynamic tearOffGenericOptional = #C7;
|
||||
tearOffGenericOptional.call();
|
||||
tearOffGenericOptional.call<self::Extension|tearOffsFromInstanceContext::#T*>();
|
||||
tearOffGenericOptional.call(value);
|
||||
tearOffGenericOptional.call<self::Extension|tearOffsFromInstanceContext::#T*>(value);
|
||||
dynamic tearOffGenericNamed = #C8;
|
||||
tearOffGenericNamed.call();
|
||||
tearOffGenericNamed.call<self::Extension|tearOffsFromInstanceContext::#T*>();
|
||||
tearOffGenericNamed.call(value: value);
|
||||
tearOffGenericNamed.call<self::Extension|tearOffsFromInstanceContext::#T*>(value: value);
|
||||
}
|
||||
static method Extension|fieldAccessFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|fieldAccessFromInstanceContext::#T*>* #this) → dynamic {
|
||||
self::Extension|field = self::Extension|property;
|
||||
self::Extension|property = self::Extension|field;
|
||||
}
|
||||
static method Extension|getterCallsFromInstanceContext<#T extends core::Object* = dynamic>(final self::Class<self::Extension|getterCallsFromInstanceContext::#T*>* #this, self::Extension|getterCallsFromInstanceContext::#T* value) → dynamic {
|
||||
self::Extension|tearOffGetterNoArgs.call();
|
||||
self::Extension|tearOffGetterRequired.call(value);
|
||||
self::Extension|tearOffGetterOptional.call();
|
||||
self::Extension|tearOffGetterOptional.call(value);
|
||||
self::Extension|tearOffGetterNamed.call();
|
||||
self::Extension|tearOffGetterNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericRequired.call(value);
|
||||
self::Extension|tearOffGetterGenericRequired.call<self::Extension|getterCallsFromInstanceContext::#T*>(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call();
|
||||
self::Extension|tearOffGetterGenericOptional.call<self::Extension|getterCallsFromInstanceContext::#T*>();
|
||||
self::Extension|tearOffGetterGenericOptional.call(value);
|
||||
self::Extension|tearOffGetterGenericOptional.call<self::Extension|getterCallsFromInstanceContext::#T*>(value);
|
||||
self::Extension|tearOffGetterGenericNamed.call();
|
||||
self::Extension|tearOffGetterGenericNamed.call<self::Extension|getterCallsFromInstanceContext::#T*>();
|
||||
self::Extension|tearOffGetterGenericNamed.call(value: value);
|
||||
self::Extension|tearOffGetterGenericNamed.call<self::Extension|getterCallsFromInstanceContext::#T*>(value: value);
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
#C2 = tearoff self::Extension|readGetter
|
||||
#C3 = tearoff self::Extension|writeSetterRequired
|
||||
#C4 = tearoff self::Extension|writeSetterOptional
|
||||
#C5 = tearoff self::Extension|writeSetterNamed
|
||||
#C6 = tearoff self::Extension|genericWriteSetterRequired
|
||||
#C7 = tearoff self::Extension|genericWriteSetterOptional
|
||||
#C8 = tearoff self::Extension|genericWriteSetterNamed
|
||||
}
|
||||
|
|
|
@ -1,48 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:11:21: Error: Expected identifier, but got 'this'.
|
||||
// void method2() => this.method1();
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:13:23: Error: Expected identifier, but got 'this'.
|
||||
// Object method3() => this.field;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:16:5: Error: Expected identifier, but got 'this'.
|
||||
// this.field = o;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -53,5 +9,16 @@ class A1 extends core::Object {
|
|||
;
|
||||
method method1() → void {}
|
||||
}
|
||||
static field invalid-type A2;
|
||||
extension A2 on self::A1* {
|
||||
method method2 = self::A2|method2;
|
||||
method method3 = self::A2|method3;
|
||||
method method4 = self::A2|method4;
|
||||
}
|
||||
static method A2|method2(final self::A1* #this) → void
|
||||
return #this.method1();
|
||||
static method A2|method3(final self::A1* #this) → core::Object*
|
||||
return #this.field;
|
||||
static method A2|method4(final self::A1* #this, core::Object* o) → void {
|
||||
#this.field = o;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,48 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:10:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:11:21: Error: Expected identifier, but got 'this'.
|
||||
// void method2() => this.method1();
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:13:23: Error: Expected identifier, but got 'this'.
|
||||
// Object method3() => this.field;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/explicit_this.dart:16:5: Error: Expected identifier, but got 'this'.
|
||||
// this.field = o;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -53,5 +9,16 @@ class A1 extends core::Object {
|
|||
;
|
||||
method method1() → void {}
|
||||
}
|
||||
static field invalid-type A2;
|
||||
extension A2 on self::A1* {
|
||||
method method2 = self::A2|method2;
|
||||
method method3 = self::A2|method3;
|
||||
method method4 = self::A2|method4;
|
||||
}
|
||||
static method A2|method2(final self::A1* #this) → void
|
||||
return #this.method1();
|
||||
static method A2|method3(final self::A1* #this) → core::Object*
|
||||
return #this.field;
|
||||
static method A2|method4(final self::A1* #this, core::Object* o) → void {
|
||||
#this.field = o;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "package:expect/expect.dart" as exp;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C*
|
||||
: super core::Object::•()
|
||||
;
|
||||
get one() → core::int*
|
||||
return 1;
|
||||
}
|
||||
extension E on self::C* {
|
||||
get two = self::E|get#two;
|
||||
}
|
||||
static method E|get#two(final self::C* #this) → core::int*
|
||||
return 2;
|
||||
static method main() → dynamic {
|
||||
self::C* c = new self::C::•();
|
||||
dynamic result = c.one.+(c.two);
|
||||
exp::Expect::equals(result, 3);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "package:expect/expect.dart" as exp;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C*
|
||||
: super core::Object::•()
|
||||
;
|
||||
get one() → core::int*
|
||||
return 1;
|
||||
}
|
||||
extension E on self::C* {
|
||||
get two = self::E|get#two;
|
||||
}
|
||||
static method E|get#two(final self::C* #this) → core::int*
|
||||
return 2;
|
||||
static method main() → dynamic {
|
||||
self::C* c = new self::C::•();
|
||||
dynamic result = c.one.+(c.two);
|
||||
exp::Expect::equals(result, 3);
|
||||
}
|
|
@ -2,8 +2,8 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
// - 'C' is from 'pkg/front_end/testcases/general/extension_methods.dart'.
|
||||
// pkg/front_end/testcases/extensions/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
// - 'C' is from 'pkg/front_end/testcases/extensions/extension_methods.dart'.
|
||||
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'two'.
|
||||
// var result = c.one + c.two;
|
||||
// ^^^
|
||||
|
@ -28,8 +28,8 @@ static method E|get#two(final self::C* #this) → core::int*
|
|||
return 2;
|
||||
static method main() → dynamic {
|
||||
self::C* c = new self::C::•();
|
||||
core::num* result = c.{self::C::one}.{core::num::+}(invalid-expression "pkg/front_end/testcases/general/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
- 'C' is from 'pkg/front_end/testcases/general/extension_methods.dart'.
|
||||
core::num* result = c.{self::C::one}.{core::num::+}(invalid-expression "pkg/front_end/testcases/extensions/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
- 'C' is from 'pkg/front_end/testcases/extensions/extension_methods.dart'.
|
||||
Try correcting the name to the name of an existing getter, or defining a getter or field named 'two'.
|
||||
var result = c.one + c.two;
|
||||
^^^" as{TypeError} core::num*);
|
|
@ -2,8 +2,8 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
// - 'C' is from 'pkg/front_end/testcases/general/extension_methods.dart'.
|
||||
// pkg/front_end/testcases/extensions/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
// - 'C' is from 'pkg/front_end/testcases/extensions/extension_methods.dart'.
|
||||
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'two'.
|
||||
// var result = c.one + c.two;
|
||||
// ^^^
|
||||
|
@ -28,8 +28,8 @@ static method E|get#two(final self::C* #this) → core::int*
|
|||
return 2;
|
||||
static method main() → dynamic {
|
||||
self::C* c = new self::C::•();
|
||||
core::num* result = c.{self::C::one}.{core::num::+}(invalid-expression "pkg/front_end/testcases/general/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
- 'C' is from 'pkg/front_end/testcases/general/extension_methods.dart'.
|
||||
core::num* result = c.{self::C::one}.{core::num::+}(invalid-expression "pkg/front_end/testcases/extensions/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'.
|
||||
- 'C' is from 'pkg/front_end/testcases/extensions/extension_methods.dart'.
|
||||
Try correcting the name to the name of an existing getter, or defining a getter or field named 'two'.
|
||||
var result = c.one + c.two;
|
||||
^^^" as{TypeError} core::num*);
|
|
@ -1,48 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:11:21: Warning: Method not found: 'method1'.
|
||||
// void method2() => method1();
|
||||
// ^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:13:23: Warning: Getter not found: 'field'.
|
||||
// Object method3() => field;
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:16:5: Warning: Setter not found: 'field'.
|
||||
// field = o;
|
||||
// ^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -53,5 +9,16 @@ class A1 extends core::Object {
|
|||
;
|
||||
method method1() → void {}
|
||||
}
|
||||
static field invalid-type A2;
|
||||
extension A2 on self::A1* {
|
||||
method method2 = self::A2|method2;
|
||||
method method3 = self::A2|method3;
|
||||
method method4 = self::A2|method4;
|
||||
}
|
||||
static method A2|method2(final self::A1* #this) → void
|
||||
return #this.method1();
|
||||
static method A2|method3(final self::A1* #this) → core::Object*
|
||||
return #this.field;
|
||||
static method A2|method4(final self::A1* #this, core::Object* o) → void {
|
||||
#this.field = o;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,48 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:10:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:11:21: Warning: Method not found: 'method1'.
|
||||
// void method2() => method1();
|
||||
// ^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:13:23: Warning: Getter not found: 'field'.
|
||||
// Object method3() => field;
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/implicit_this.dart:16:5: Warning: Setter not found: 'field'.
|
||||
// field = o;
|
||||
// ^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -53,5 +9,16 @@ class A1 extends core::Object {
|
|||
;
|
||||
method method1() → void {}
|
||||
}
|
||||
static field invalid-type A2;
|
||||
extension A2 on self::A1* {
|
||||
method method2 = self::A2|method2;
|
||||
method method3 = self::A2|method3;
|
||||
method method4 = self::A2|method4;
|
||||
}
|
||||
static method A2|method2(final self::A1* #this) → void
|
||||
return #this.method1();
|
||||
static method A2|method3(final self::A1* #this) → core::Object*
|
||||
return #this.field;
|
||||
static method A2|method4(final self::A1* #this, core::Object* o) → void {
|
||||
#this.field = o;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,113 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:17: Error: Expected '{' before this.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:20: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:20: Error: 'B1' is already declared in this scope.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:28:7: Context: Previous declaration of 'B1'.
|
||||
// class B1<T> {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:1: Warning: Type 'extension' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:17: Warning: Type 'on' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:8:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:9:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:12:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method2<T>(T o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:14:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:17:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method3<T>([T o]) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:19:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:22:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method4<T>({T o}) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:24:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:31:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:32:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:35:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method2<S>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:37:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -121,6 +12,40 @@ class B1<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type A2;
|
||||
static method B2<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension A2 on self::A1* {
|
||||
method method1 = self::A2|method1;
|
||||
method method2 = self::A2|method2;
|
||||
method method3 = self::A2|method3;
|
||||
method method4 = self::A2|method4;
|
||||
}
|
||||
extension B2<T extends core::Object* = dynamic> on self::B1<T*>* {
|
||||
method method1 = self::B2|method1;
|
||||
method method2 = self::B2|method2;
|
||||
}
|
||||
static method A2|method1(final self::A1* #this) → self::A1* {
|
||||
return #this;
|
||||
}
|
||||
static method A2|method2<T extends core::Object* = dynamic>(final self::A1* #this, self::A2|method2::T* o) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method A2|method3<T extends core::Object* = dynamic>(final self::A1* #this = #C1, [self::A2|method3::T* o = #C1]) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method A2|method4<T extends core::Object* = dynamic>(final self::A1* #this = #C1, {self::A2|method4::T* o = #C1}) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method B2|method1<#T extends core::Object* = dynamic>(final self::B1<self::B2|method1::#T*>* #this) → self::B1<self::B2|method1::#T*>* {
|
||||
return #this;
|
||||
}
|
||||
static method B2|method2<#T extends core::Object* = dynamic, S extends core::Object* = dynamic>(final self::B1<self::B2|method2::#T*>* #this, self::B2|method2::S* o) → self::B1<self::B2|method2::#T*>* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
}
|
||||
|
|
|
@ -1,113 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:17: Error: Expected '{' before this.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:20: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:20: Error: 'B1' is already declared in this scope.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:28:7: Context: Previous declaration of 'B1'.
|
||||
// class B1<T> {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:1: Warning: Type 'extension' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:30:17: Warning: Type 'on' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:7:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:8:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:9:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:12:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method2<T>(T o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:14:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:17:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method3<T>([T o]) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:19:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:22:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method4<T>({T o}) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:24:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:31:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:32:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:35:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method2<S>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/instance_members.dart:37:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -121,6 +12,40 @@ class B1<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type A2;
|
||||
static method B2<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension A2 on self::A1* {
|
||||
method method1 = self::A2|method1;
|
||||
method method2 = self::A2|method2;
|
||||
method method3 = self::A2|method3;
|
||||
method method4 = self::A2|method4;
|
||||
}
|
||||
extension B2<T extends core::Object* = dynamic> on self::B1<T*>* {
|
||||
method method1 = self::B2|method1;
|
||||
method method2 = self::B2|method2;
|
||||
}
|
||||
static method A2|method1(final self::A1* #this) → self::A1* {
|
||||
return #this;
|
||||
}
|
||||
static method A2|method2<T extends core::Object* = dynamic>(final self::A1* #this, self::A2|method2::T* o) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method A2|method3<T extends core::Object* = dynamic>(final self::A1* #this = #C1, [self::A2|method3::T* o = #C1]) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method A2|method4<T extends core::Object* = dynamic>(final self::A1* #this = #C1, {self::A2|method4::T* o = #C1}) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method B2|method1<#T extends core::Object* = dynamic>(final self::B1<self::B2|method1::#T*>* #this) → self::B1<self::B2|method1::#T*>* {
|
||||
return #this;
|
||||
}
|
||||
static method B2|method2<#T extends core::Object* = dynamic, S extends core::Object* = dynamic>(final self::B1<self::B2|method2::#T*>* #this, self::B2|method2::S* o) → self::B1<self::B2|method2::#T*>* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
#C1 = null
|
||||
}
|
||||
|
|
|
@ -1,142 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:7: Error: Expected ';' after this.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:28: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:31: Warning: Method not found: 'getInstanceField'.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:21:8: Error: Expected ';' after this.
|
||||
// void set instanceProperty(int value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:21:12: Error: 'instanceProperty' is already declared in this scope.
|
||||
// void set instanceProperty(int value) {
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:11: Context: Previous declaration of 'instanceProperty'.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:22:5: Warning: Method not found: 'setInstanceField'.
|
||||
// setInstanceField(value);
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:27:7: Error: Expected ';' after this.
|
||||
// int operator +(int value) {
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:27:16: Error: '+' is not a prefix operator.
|
||||
// Try removing '+'.
|
||||
// int operator +(int value) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:28:12: Warning: Method not found: 'getInstanceField'.
|
||||
// return getInstanceField() + value;
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:29:3: Error: Expected ';' after this.
|
||||
// }
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:31:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static int staticField = A1.getStaticField();
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:31:28: Error: Can't use 'A1' because it is declared more than once.
|
||||
// static int staticField = A1.getStaticField();
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:14: Error: 'get' is already declared in this scope.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:7: Context: Previous declaration of 'get'.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:14: Error: Expected ';' after this.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:33: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:36: Error: Can't use 'A1' because it is declared more than once.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:15: Error: 'set' is already declared in this scope.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:21:8: Context: Previous declaration of 'set'.
|
||||
// void set instanceProperty(int value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:15: Error: Expected ';' after this.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:19: Error: 'staticProperty' is already declared in this scope.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:18: Context: Previous declaration of 'staticProperty'.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:36:5: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1.setStaticField(value);
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -157,5 +19,26 @@ class A1 extends core::Object {
|
|||
self::A1::_staticField = value;
|
||||
}
|
||||
}
|
||||
static field invalid-type A2;
|
||||
extension A2 on self::A1* {
|
||||
get instanceProperty = self::A2|get#instanceProperty;
|
||||
operator + = self::A2|+;
|
||||
static field staticField = self::A2|staticField;
|
||||
static get staticProperty = get self::A2|staticProperty;
|
||||
set instanceProperty = self::A2|set#instanceProperty;
|
||||
static set staticProperty = set self::A2|staticProperty;
|
||||
}
|
||||
static field core::int* A2|staticField = self::A1::getStaticField();
|
||||
static method A2|get#instanceProperty(final self::A1* #this) → core::int*
|
||||
return #this.getInstanceField();
|
||||
static method A2|set#instanceProperty(final self::A1* #this, core::int* value) → void {
|
||||
#this.setInstanceField(value);
|
||||
}
|
||||
static method A2|+(final self::A1* #this, core::int* value) → core::int* {
|
||||
return #this.getInstanceField().+(value);
|
||||
}
|
||||
static get A2|staticProperty() → core::int*
|
||||
return self::A1::getStaticField();
|
||||
static set A2|staticProperty(core::int* value) → void {
|
||||
self::A1::setStaticField(value);
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,142 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:7: Error: Expected ';' after this.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:28: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:31: Warning: Method not found: 'getInstanceField'.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:21:8: Error: Expected ';' after this.
|
||||
// void set instanceProperty(int value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:21:12: Error: 'instanceProperty' is already declared in this scope.
|
||||
// void set instanceProperty(int value) {
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:11: Context: Previous declaration of 'instanceProperty'.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:22:5: Warning: Method not found: 'setInstanceField'.
|
||||
// setInstanceField(value);
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:27:7: Error: Expected ';' after this.
|
||||
// int operator +(int value) {
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:27:16: Error: '+' is not a prefix operator.
|
||||
// Try removing '+'.
|
||||
// int operator +(int value) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:28:12: Warning: Method not found: 'getInstanceField'.
|
||||
// return getInstanceField() + value;
|
||||
// ^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:29:3: Error: Expected ';' after this.
|
||||
// }
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:31:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static int staticField = A1.getStaticField();
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:31:28: Error: Can't use 'A1' because it is declared more than once.
|
||||
// static int staticField = A1.getStaticField();
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:14: Error: 'get' is already declared in this scope.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:19:7: Context: Previous declaration of 'get'.
|
||||
// int get instanceProperty => getInstanceField();
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:14: Error: Expected ';' after this.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:33: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:36: Error: Can't use 'A1' because it is declared more than once.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:15: Error: 'set' is already declared in this scope.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:21:8: Context: Previous declaration of 'set'.
|
||||
// void set instanceProperty(int value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:15: Error: Expected ';' after this.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:35:19: Error: 'staticProperty' is already declared in this scope.
|
||||
// static void set staticProperty(int value) {
|
||||
// ^^^^^^^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:33:18: Context: Previous declaration of 'staticProperty'.
|
||||
// static int get staticProperty => A1.getStaticField();
|
||||
// ^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/other_kinds.dart:36:5: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1.setStaticField(value);
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -157,5 +19,26 @@ class A1 extends core::Object {
|
|||
self::A1::_staticField = value;
|
||||
}
|
||||
}
|
||||
static field invalid-type A2;
|
||||
extension A2 on self::A1* {
|
||||
get instanceProperty = self::A2|get#instanceProperty;
|
||||
operator + = self::A2|+;
|
||||
static field staticField = self::A2|staticField;
|
||||
static get staticProperty = get self::A2|staticProperty;
|
||||
set instanceProperty = self::A2|set#instanceProperty;
|
||||
static set staticProperty = set self::A2|staticProperty;
|
||||
}
|
||||
static field core::int* A2|staticField = self::A1::getStaticField();
|
||||
static method A2|get#instanceProperty(final self::A1* #this) → core::int*
|
||||
return #this.getInstanceField();
|
||||
static method A2|set#instanceProperty(final self::A1* #this, core::int* value) → void {
|
||||
#this.setInstanceField(value);
|
||||
}
|
||||
static method A2|+(final self::A1* #this, core::int* value) → core::int* {
|
||||
return #this.getInstanceField().+(value);
|
||||
}
|
||||
static get A2|staticProperty() → core::int*
|
||||
return self::A1::getStaticField();
|
||||
static set A2|staticProperty(core::int* value) → void {
|
||||
self::A1::setStaticField(value);
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,91 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:24: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:24: Error: 'Class' is already declared in this scope.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:5:7: Context: Previous declaration of 'Class'.
|
||||
// class Class {}
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:1: Warning: Type 'extension' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:21: Warning: Type 'on' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:1: Warning: 'extension' isn't a type.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:8:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static method() {}
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:9:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericMethod<T>(T t) {}
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get property => 42;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get property => 42;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:10: Error: Expected ';' after this.
|
||||
// static get property => 42;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:23: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get property => 42;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static set property(value) {}
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static set property(value) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:10: Error: Expected ';' after this.
|
||||
// static set property(value) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:14: Error: 'property' is already declared in this scope.
|
||||
// static set property(value) {}
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:14: Context: Previous declaration of 'property'.
|
||||
// static get property => 42;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:12:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static var field;
|
||||
// ^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -94,15 +7,32 @@ class Class extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type Extension;
|
||||
static method main() → dynamic {
|
||||
self::Extension.method();
|
||||
self::Extension.genericMethod(42);
|
||||
self::Extension.genericMethod<core::num*>(42);
|
||||
self::Extension.method;
|
||||
self::Extension.genericMethod;
|
||||
self::Extension.property;
|
||||
self::Extension.property = 42;
|
||||
self::Extension.field;
|
||||
self::Extension.field = 42;
|
||||
extension Extension on self::Class* {
|
||||
static method method = self::Extension|method;
|
||||
static method genericMethod = self::Extension|genericMethod;
|
||||
static get property = get self::Extension|property;
|
||||
static field field = self::Extension|field;
|
||||
static set property = set self::Extension|property;
|
||||
}
|
||||
static field dynamic Extension|field;
|
||||
static method Extension|method() → dynamic {}
|
||||
static method Extension|genericMethod<T extends core::Object* = dynamic>(self::Extension|genericMethod::T* t) → dynamic {}
|
||||
static get Extension|property() → dynamic
|
||||
return 42;
|
||||
static set Extension|property(dynamic value) → void {}
|
||||
static method main() → dynamic {
|
||||
self::Extension|method();
|
||||
self::Extension|genericMethod<dynamic>(42);
|
||||
self::Extension|genericMethod<core::num*>(42);
|
||||
#C1;
|
||||
#C2;
|
||||
self::Extension|property;
|
||||
self::Extension|property = 42;
|
||||
self::Extension|field;
|
||||
self::Extension|field = 42;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = tearoff self::Extension|method
|
||||
#C2 = tearoff self::Extension|genericMethod
|
||||
}
|
||||
|
|
|
@ -1,91 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:24: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:24: Error: 'Class' is already declared in this scope.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:5:7: Context: Previous declaration of 'Class'.
|
||||
// class Class {}
|
||||
// ^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:1: Warning: Type 'extension' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:21: Warning: Type 'on' not found.
|
||||
// extension Extension on Class {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:7:1: Warning: 'extension' isn't a type.
|
||||
// extension Extension on Class {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:8:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static method() {}
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:9:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static genericMethod<T>(T t) {}
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static get property => 42;
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static get property => 42;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:10: Error: Expected ';' after this.
|
||||
// static get property => 42;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:23: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// static get property => 42;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static set property(value) {}
|
||||
// ^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static set property(value) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:10: Error: Expected ';' after this.
|
||||
// static set property(value) {}
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:11:14: Error: 'property' is already declared in this scope.
|
||||
// static set property(value) {}
|
||||
// ^^^^^^^^
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:10:14: Context: Previous declaration of 'property'.
|
||||
// static get property => 42;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/static_access.dart:12:3: Error: Can't have modifier 'static' here.
|
||||
// Try removing 'static'.
|
||||
// static var field;
|
||||
// ^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -94,15 +7,32 @@ class Class extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type Extension;
|
||||
static method main() → dynamic {
|
||||
self::Extension.method();
|
||||
self::Extension.genericMethod(42);
|
||||
self::Extension.genericMethod<core::num*>(42);
|
||||
self::Extension.method;
|
||||
self::Extension.genericMethod;
|
||||
self::Extension.property;
|
||||
self::Extension.property = 42;
|
||||
self::Extension.field;
|
||||
self::Extension.field = 42;
|
||||
extension Extension on self::Class* {
|
||||
static method method = self::Extension|method;
|
||||
static method genericMethod = self::Extension|genericMethod;
|
||||
static get property = get self::Extension|property;
|
||||
static field field = self::Extension|field;
|
||||
static set property = set self::Extension|property;
|
||||
}
|
||||
static field dynamic Extension|field;
|
||||
static method Extension|method() → dynamic {}
|
||||
static method Extension|genericMethod<T extends core::Object* = dynamic>(self::Extension|genericMethod::T* t) → dynamic {}
|
||||
static get Extension|property() → dynamic
|
||||
return 42;
|
||||
static set Extension|property(dynamic value) → void {}
|
||||
static method main() → dynamic {
|
||||
self::Extension|method();
|
||||
self::Extension|genericMethod<dynamic>(42);
|
||||
self::Extension|genericMethod<core::num*>(42);
|
||||
#C1;
|
||||
#C2;
|
||||
self::Extension|property;
|
||||
self::Extension|property = 42;
|
||||
self::Extension|field;
|
||||
self::Extension|field = 42;
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = tearoff self::Extension|method
|
||||
#C2 = tearoff self::Extension|genericMethod
|
||||
}
|
||||
|
|
1
pkg/front_end/testcases/extensions/test.options
Normal file
1
pkg/front_end/testcases/extensions/test.options
Normal file
|
@ -0,0 +1 @@
|
|||
--enable-experiment=extension-methods
|
|
@ -1,56 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:17: Error: Expected '{' before this.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:20: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:20: Error: 'A1' is already declared in this scope.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1<T> {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:1: Warning: Type 'extension' not found.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:17: Warning: Type 'on' not found.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:8:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1<T> method1<S extends T>() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:9:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:14:27: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1<T> method2<S extends A1<T>>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:14:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1<T> method2<S extends A1<T>>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:18:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -59,5 +7,17 @@ class A1<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static method A2<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension A2<T extends core::Object* = dynamic> on self::A1<T*>* {
|
||||
method method1 = self::A2|method1;
|
||||
method method2 = self::A2|method2;
|
||||
}
|
||||
static method A2|method1<#T extends core::Object* = dynamic, S extends self::A2|method1::#T = dynamic>(final self::A1<self::A2|method1::#T*>* #this) → self::A1<self::A2|method1::#T*>* {
|
||||
return #this;
|
||||
}
|
||||
static method A2|method2<#T extends core::Object* = dynamic, S extends self::A1<self::A2|method2::#T>* = dynamic>(final self::A1<self::A2|method2::#T*>* #this, self::A2|method2::S* o) → self::A1<self::A2|method2::#T*>* {
|
||||
core::print(o);
|
||||
core::print(self::A2|method2::#T*);
|
||||
core::print(self::A2|method2::S*);
|
||||
return #this;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,56 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:17: Error: Expected '{' before this.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:20: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:20: Error: 'A1' is already declared in this scope.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:5:7: Context: Previous declaration of 'A1'.
|
||||
// class A1<T> {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:1: Warning: Type 'extension' not found.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:7:17: Warning: Type 'on' not found.
|
||||
// extension A2<T> on A1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:8:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1<T> method1<S extends T>() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:9:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:14:27: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1<T> method2<S extends A1<T>>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:14:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1<T> method2<S extends A1<T>>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/type_variables.dart:18:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -59,5 +7,17 @@ class A1<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static method A2<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension A2<T extends core::Object* = dynamic> on self::A1<T*>* {
|
||||
method method1 = self::A2|method1;
|
||||
method method2 = self::A2|method2;
|
||||
}
|
||||
static method A2|method1<#T extends core::Object* = dynamic, S extends self::A2|method1::#T = dynamic>(final self::A1<self::A2|method1::#T*>* #this) → self::A1<self::A2|method1::#T*>* {
|
||||
return #this;
|
||||
}
|
||||
static method A2|method2<#T extends core::Object* = dynamic, S extends self::A1<self::A2|method2::#T>* = dynamic>(final self::A1<self::A2|method2::#T*>* #this, self::A2|method2::S* o) → self::A1<self::A2|method2::#T*>* {
|
||||
core::print(o);
|
||||
core::print(self::A2|method2::#T*);
|
||||
core::print(self::A2|method2::S*);
|
||||
return #this;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,97 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:7:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:17: Error: Expected '{' before this.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:20: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:20: Error: 'B1' is already declared in this scope.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:20:7: Context: Previous declaration of 'B1'.
|
||||
// class B1<T> {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:1: Warning: Type 'extension' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:17: Warning: Type 'on' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:10:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:11:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:14:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method2<T>(T o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:16:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:23:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:24:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:27:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method2<S>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:29:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -105,6 +12,26 @@ class B1<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type A2;
|
||||
static method B2<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension A2 on self::A1* {
|
||||
method method1 = self::A2|method1;
|
||||
method method2 = self::A2|method2;
|
||||
}
|
||||
extension B2<T extends core::Object* = dynamic> on self::B1<T*>* {
|
||||
method method1 = self::B2|method1;
|
||||
method method2 = self::B2|method2;
|
||||
}
|
||||
static method A2|method1(final self::A1* #this) → self::A1* {
|
||||
return #this;
|
||||
}
|
||||
static method A2|method2<T extends core::Object* = dynamic>(final self::A1* #this, self::A2|method2::T* o) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method B2|method1<#T extends core::Object* = dynamic>(final self::B1<self::B2|method1::#T*>* #this) → self::B1<self::B2|method1::#T*>* {
|
||||
return #this;
|
||||
}
|
||||
static method B2|method2<#T extends core::Object* = dynamic, S extends core::Object* = dynamic>(final self::B1<self::B2|method2::#T*>* #this, self::B2|method2::S* o) → self::B1<self::B2|method2::#T*>* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,97 +1,4 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:17: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:17: Error: 'A1' is already declared in this scope.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:7:7: Context: Previous declaration of 'A1'.
|
||||
// class A1 {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:11: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:17: Error: Expected '{' before this.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:20: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:20: Error: 'B1' is already declared in this scope.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:20:7: Context: Previous declaration of 'B1'.
|
||||
// class B1<T> {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Warning: Type 'extension' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:14: Warning: Type 'on' not found.
|
||||
// extension A2 on A1 {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:1: Warning: Type 'extension' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:22:17: Warning: Type 'on' not found.
|
||||
// extension B2<T> on B1<T> {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Warning: 'extension' isn't a type.
|
||||
// extension A2 on A1 {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:10:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:11:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:14:3: Error: Can't use 'A1' because it is declared more than once.
|
||||
// A1 method2<T>(T o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:16:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:23:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method1() {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:24:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:27:3: Error: Can't use 'B1' because it is declared more than once.
|
||||
// B1<T> method2<S>(S o) {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extensions/use_this.dart:29:12: Error: Expected identifier, but got 'this'.
|
||||
// return this;
|
||||
// ^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
|
@ -105,6 +12,26 @@ class B1<T extends core::Object* = dynamic> extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
}
|
||||
static field invalid-type A2;
|
||||
static method B2<T extends core::Object* = dynamic>() → invalid-type {}
|
||||
extension A2 on self::A1* {
|
||||
method method1 = self::A2|method1;
|
||||
method method2 = self::A2|method2;
|
||||
}
|
||||
extension B2<T extends core::Object* = dynamic> on self::B1<T*>* {
|
||||
method method1 = self::B2|method1;
|
||||
method method2 = self::B2|method2;
|
||||
}
|
||||
static method A2|method1(final self::A1* #this) → self::A1* {
|
||||
return #this;
|
||||
}
|
||||
static method A2|method2<T extends core::Object* = dynamic>(final self::A1* #this, self::A2|method2::T* o) → self::A1* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method B2|method1<#T extends core::Object* = dynamic>(final self::B1<self::B2|method1::#T*>* #this) → self::B1<self::B2|method1::#T*>* {
|
||||
return #this;
|
||||
}
|
||||
static method B2|method2<#T extends core::Object* = dynamic, S extends core::Object* = dynamic>(final self::B1<self::B2|method2::#T*>* #this, self::B2|method2::S* o) → self::B1<self::B2|method2::#T*>* {
|
||||
core::print(o);
|
||||
return #this;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension E on C {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:16: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension E on C {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:16: Error: 'C' is already declared in this scope.
|
||||
// extension E on C {
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:9:7: Context: Previous declaration of 'C'.
|
||||
// class C {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:1: Warning: Type 'extension' not found.
|
||||
// extension E on C {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:13: Warning: Type 'on' not found.
|
||||
// extension E on C {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:1: Warning: 'extension' isn't a type.
|
||||
// extension E on C {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:14:7: Error: Expected ';' after this.
|
||||
// int get two => 2;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:14:15: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// int get two => 2;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:18:3: Error: Can't use 'C' because it is declared more than once.
|
||||
// C c = C();
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:18:9: Error: Can't use 'C' because it is declared more than once.
|
||||
// C c = C();
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "package:expect/expect.dart" as exp;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C*
|
||||
: super core::Object::•()
|
||||
;
|
||||
get one() → core::int*
|
||||
return 1;
|
||||
}
|
||||
static field invalid-type E;
|
||||
static method main() → dynamic {
|
||||
invalid-type c = invalid-expression "pkg/front_end/testcases/general/extension_methods.dart:18:9: Error: Can't use 'C' because it is declared more than once.
|
||||
C c = C();
|
||||
^".call();
|
||||
dynamic result = c.one.+(c.two);
|
||||
exp::Expect::equals(result, 3);
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:1: Error: This requires the 'extension-methods' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// extension E on C {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:16: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// extension E on C {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:16: Error: 'C' is already declared in this scope.
|
||||
// extension E on C {
|
||||
// ^
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:9:7: Context: Previous declaration of 'C'.
|
||||
// class C {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:1: Warning: Type 'extension' not found.
|
||||
// extension E on C {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:13: Warning: Type 'on' not found.
|
||||
// extension E on C {
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:13:1: Warning: 'extension' isn't a type.
|
||||
// extension E on C {
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:14:7: Error: Expected ';' after this.
|
||||
// int get two => 2;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:14:15: Error: A function declaration needs an explicit list of parameters.
|
||||
// Try adding a parameter list to the function declaration.
|
||||
// int get two => 2;
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:18:3: Error: Can't use 'C' because it is declared more than once.
|
||||
// C c = C();
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/general/extension_methods.dart:18:9: Error: Can't use 'C' because it is declared more than once.
|
||||
// C c = C();
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "package:expect/expect.dart" as exp;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C*
|
||||
: super core::Object::•()
|
||||
;
|
||||
get one() → core::int*
|
||||
return 1;
|
||||
}
|
||||
static field invalid-type E;
|
||||
static method main() → dynamic {
|
||||
invalid-type c = invalid-expression "pkg/front_end/testcases/general/extension_methods.dart:18:9: Error: Can't use 'C' because it is declared more than once.
|
||||
C c = C();
|
||||
^".call();
|
||||
dynamic result = c.one.+(c.two);
|
||||
exp::Expect::equals(result, 3);
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
# Status file for the legacy_test.dart test suite. This is testing generating
|
||||
# Kernel ASTs in legacy mode (Dart 1.0).
|
||||
|
||||
extensions/static_access: RuntimeError
|
||||
extensions/extension_methods: RuntimeError
|
||||
general/DeltaBlue: Fail # Fasta and dartk disagree on static initializers
|
||||
general/ambiguous_exports: RuntimeError # Expected, this file exports two main methods.
|
||||
general/await_in_non_async: RuntimeError # Expected.
|
||||
|
@ -14,14 +14,15 @@ general/bug37476: RuntimeError # Expected.
|
|||
general/call: Fail # Test can't run.
|
||||
general/constructor_const_inference: RuntimeError # Test exercises strong mode semantics. See also Issue #33813.
|
||||
general/constructor_initializer_invalid: RuntimeError # Fails execution after recovery
|
||||
general/control_flow_collection: RuntimeError
|
||||
general/control_flow_collection: Crash
|
||||
general/control_flow_collection_inference: Crash
|
||||
general/duplicated_field_initializer: RuntimeError
|
||||
general/extension_methods: RuntimeError
|
||||
general/external_import: RuntimeError # Expected -- test uses import which doesn't exist.
|
||||
general/fallthrough: Fail # Missing FallThroughError.
|
||||
general/function_type_recovery: Fail
|
||||
general/incomplete_field_formal_parameter: Fail # Fasta doesn't recover well
|
||||
general/invocations: Fail
|
||||
general/issue37027: Crash
|
||||
general/issue37776: RuntimeError
|
||||
general/micro: Fail # External method marked abstract.
|
||||
general/minimum_int: Crash # Min int literal not supported in non-strong mode.
|
||||
|
@ -38,7 +39,8 @@ general/redirecting_factory_typeargs_test: Fail # Missing support for Redirectin
|
|||
general/redirecting_factory_typeparam_test: Fail # Missing support for RedirectingFactoryConstructor.
|
||||
general/redirecting_factory_typeparambounds_test: Fail # Missing support for RedirectingFactoryConstructor.
|
||||
general/reject_generic_function_types_in_bounds: RuntimeError # Expected
|
||||
general/spread_collection: RuntimeError
|
||||
general/spread_collection: Crash
|
||||
general/spread_collection_inference: Crash
|
||||
general/type_parameter_type_named_int: RuntimeError # Expected
|
||||
general/type_variable_as_super: Fail
|
||||
general/uninitialized_fields: Fail # Fasta and dartk disagree on static initializers
|
||||
|
|
|
@ -1,194 +1,20 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:6: Error: Expected ';' after this.
|
||||
// late int lateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late int lateStaticField;
|
||||
// ^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:1: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:1: Error: Expected ';' after this.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:16: Error: The final variable 'finalLateStaticField' must be initialized.
|
||||
// Try adding an initializer ('= <expression>') to the declaration.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:8: Error: Expected ';' after this.
|
||||
// late int lateInstanceField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:12: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:3: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:3: Error: Expected ';' after this.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:15: Error: Expected ';' after this.
|
||||
// static late int lateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:15: Error: 'int' is already declared in this scope.
|
||||
// static late int lateStaticField;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:8: Context: Previous declaration of 'int'.
|
||||
// late int lateInstanceField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:19: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: Expected ';' after this.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: 'late' is already declared in this scope.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:3: Context: Previous declaration of 'late'.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:3: Warning: 'late' isn't a type.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:3: Context: This isn't a type.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:14: Warning: 'int' isn't a type.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:14: Context: This isn't a type.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:10: Warning: 'late' isn't a type.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:10: Context: This isn't a type.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:21: Warning: 'int' isn't a type.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:21: Context: This isn't a type.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:1: Warning: 'late' isn't a type.
|
||||
// late int lateStaticField;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:1: Context: This isn't a type.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:12: Warning: 'int' isn't a type.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:6: Context: This isn't a type.
|
||||
// late int lateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:1: Warning: 'late' isn't a type.
|
||||
// late int lateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:12: Warning: 'int' isn't a type.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:3: Error: Can't use 'late' because it is declared more than once.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:14: Error: Can't use 'int' because it is declared more than once.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:10: Error: Can't use 'late' because it is declared more than once.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:21: Error: Can't use 'int' because it is declared more than once.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:16:5: Error: Can't use 'late' because it is declared more than once.
|
||||
// late int lateVariable;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:16:10: Error: Expected ';' after this.
|
||||
// late int lateVariable;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:16:14: Warning: Getter not found: 'lateVariable'.
|
||||
// late int lateVariable;
|
||||
// ^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Expected ';' after this.
|
||||
// late final int lateFinalVariable = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Can't use 'late' because it is declared more than once.
|
||||
// late final int lateFinalVariable = 0;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:17:16: Warning: 'int' isn't a type.
|
||||
// late final int lateFinalVariable = 0;
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Class extends core::Object {
|
||||
field invalid-type int = null;
|
||||
field dynamic lateInstanceField = null;
|
||||
field dynamic late = null;
|
||||
final field invalid-type finalLateInstanceField = 0;
|
||||
field dynamic lateStaticField = null;
|
||||
final field invalid-type finalLateStaticField = 0;
|
||||
late field core::int* lateInstanceField = null;
|
||||
late final field core::int* finalLateInstanceField = 0;
|
||||
late static field core::int* lateStaticField = null;
|
||||
late static final field core::int* finalLateStaticField = 0;
|
||||
synthetic constructor •() → self::Class*
|
||||
: super core::Object::•()
|
||||
;
|
||||
method method() → dynamic {
|
||||
invalid-type int;
|
||||
this.lateVariable;
|
||||
invalid-expression "pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Can't use 'late' because it is declared more than once.
|
||||
late final int lateFinalVariable = 0;
|
||||
^";
|
||||
final invalid-type lateFinalVariable = 0;
|
||||
late core::int* lateVariable;
|
||||
late final core::int* lateFinalVariable = 0;
|
||||
}
|
||||
}
|
||||
static field invalid-type int;
|
||||
static field dynamic lateStaticField;
|
||||
static field dynamic late;
|
||||
static final field invalid-type finalLateStaticField;
|
||||
late static field core::int* lateStaticField;
|
||||
late static final field core::int* finalLateStaticField;
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -1,194 +1,20 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:6: Error: Expected ';' after this.
|
||||
// late int lateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late int lateStaticField;
|
||||
// ^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:1: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:1: Error: Expected ';' after this.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:16: Error: The final variable 'finalLateStaticField' must be initialized.
|
||||
// Try adding an initializer ('= <expression>') to the declaration.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:8: Error: Expected ';' after this.
|
||||
// late int lateInstanceField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:12: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:3: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:3: Error: Expected ';' after this.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:15: Error: Expected ';' after this.
|
||||
// static late int lateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:15: Error: 'int' is already declared in this scope.
|
||||
// static late int lateStaticField;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:8: Context: Previous declaration of 'int'.
|
||||
// late int lateInstanceField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:19: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
|
||||
// Try adding the name of the type of the variable or the keyword 'var'.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: Expected ';' after this.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: 'late' is already declared in this scope.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:3: Context: Previous declaration of 'late'.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:3: Warning: 'late' isn't a type.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:3: Context: This isn't a type.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:14: Warning: 'int' isn't a type.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:14: Context: This isn't a type.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:10: Warning: 'late' isn't a type.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:10: Context: This isn't a type.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:21: Warning: 'int' isn't a type.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:21: Context: This isn't a type.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:1: Warning: 'late' isn't a type.
|
||||
// late int lateStaticField;
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:1: Context: This isn't a type.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:12: Warning: 'int' isn't a type.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:6: Context: This isn't a type.
|
||||
// late int lateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:5:1: Warning: 'late' isn't a type.
|
||||
// late int lateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:6:12: Warning: 'int' isn't a type.
|
||||
// late final int finalLateStaticField;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:9:3: Error: Can't use 'late' because it is declared more than once.
|
||||
// late int lateInstanceField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:10:14: Error: Can't use 'int' because it is declared more than once.
|
||||
// late final int finalLateInstanceField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:12:10: Error: Can't use 'late' because it is declared more than once.
|
||||
// static late int lateStaticField;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:13:21: Error: Can't use 'int' because it is declared more than once.
|
||||
// static late final int finalLateStaticField = 0;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:16:5: Error: Can't use 'late' because it is declared more than once.
|
||||
// late int lateVariable;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:16:10: Error: Expected ';' after this.
|
||||
// late int lateVariable;
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:16:14: Warning: Getter not found: 'lateVariable'.
|
||||
// late int lateVariable;
|
||||
// ^^^^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Expected ';' after this.
|
||||
// late final int lateFinalVariable = 0;
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Can't use 'late' because it is declared more than once.
|
||||
// late final int lateFinalVariable = 0;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/late.dart:17:16: Warning: 'int' isn't a type.
|
||||
// late final int lateFinalVariable = 0;
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Class extends core::Object {
|
||||
field invalid-type int = null;
|
||||
field dynamic lateInstanceField = null;
|
||||
field dynamic late = null;
|
||||
final field invalid-type finalLateInstanceField = 0;
|
||||
field dynamic lateStaticField = null;
|
||||
final field invalid-type finalLateStaticField = 0;
|
||||
late field core::int* lateInstanceField = null;
|
||||
late final field core::int* finalLateInstanceField = 0;
|
||||
late static field core::int* lateStaticField = null;
|
||||
late static final field core::int* finalLateStaticField = 0;
|
||||
synthetic constructor •() → self::Class*
|
||||
: super core::Object::•()
|
||||
;
|
||||
method method() → dynamic {
|
||||
invalid-type int;
|
||||
this.lateVariable;
|
||||
invalid-expression "pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Can't use 'late' because it is declared more than once.
|
||||
late final int lateFinalVariable = 0;
|
||||
^";
|
||||
final invalid-type lateFinalVariable = 0;
|
||||
late core::int* lateVariable;
|
||||
late final core::int* lateFinalVariable = 0;
|
||||
}
|
||||
}
|
||||
static field invalid-type int;
|
||||
static field dynamic lateStaticField;
|
||||
static field dynamic late;
|
||||
static final field invalid-type finalLateStaticField;
|
||||
late static field core::int* lateStaticField;
|
||||
late static final field core::int* finalLateStaticField;
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -2,26 +2,6 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:5:6: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int? field;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:6:6: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int? bar(int? x);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:6:15: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int? bar(int? x);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:17:54: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int test_nullable_function_type_formal_param({int f()? : null}) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:4:7: Error: The non-abstract class 'Foo' is missing implementations for these members:
|
||||
// - Foo.bar
|
||||
// Try to either
|
||||
|
|
|
@ -2,26 +2,6 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:5:6: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int? field;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:6:6: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int? bar(int? x);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:6:15: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int? bar(int? x);
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:17:54: Error: This requires the 'non-nullable' experiment to be enabled.
|
||||
// Try enabling this experiment by adding it to the command line when compiling and running.
|
||||
// int test_nullable_function_type_formal_param({int f()? : null}) {
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/nullable_param.dart:4:7: Error: The non-abstract class 'Foo' is missing implementations for these members:
|
||||
// - Foo.bar
|
||||
// Try to either
|
||||
|
|
|
@ -1,72 +1,17 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:5:29: Error: Expected '}' before this.
|
||||
// method({int a, required int b, required final int c}) {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:8:31: Error: Expected '}' before this.
|
||||
// method({int a, required int b, required final int c, required covariant final int d}) {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:12:50: Error: Expected '}' before this.
|
||||
// typedef Typedef1 = Function({int a, required int b});
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:14:39: Error: Expected '}' before this.
|
||||
// typedef Typedef2({int a, required int b});
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:16:31: Error: Expected '}' before this.
|
||||
// Function({int a, required int b}) field;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:5:16: Warning: Type 'required' not found.
|
||||
// method({int a, required int b, required final int c}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:8:18: Warning: Type 'required' not found.
|
||||
// method({int a, required int b, required final int c, required covariant final int d}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:12:37: Warning: Type 'required' not found.
|
||||
// typedef Typedef1 = Function({int a, required int b});
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:14:26: Warning: Type 'required' not found.
|
||||
// typedef Typedef2({int a, required int b});
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:16:18: Warning: Type 'required' not found.
|
||||
// Function({int a, required int b}) field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:5:16: Warning: 'required' isn't a type.
|
||||
// method({int a, required int b, required final int c}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:8:18: Warning: 'required' isn't a type.
|
||||
// method({int a, required int b, required final int c, required covariant final int d}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:16:18: Warning: 'required' isn't a type.
|
||||
// Function({int a, required int b}) field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
typedef Typedef1 = ({a: core::int*, int: invalid-type}) →* dynamic;
|
||||
typedef Typedef2 = ({a: core::int*, int: invalid-type}) →* dynamic;
|
||||
typedef Typedef1 = ({a: core::int*, required b: core::int*}) →* dynamic;
|
||||
typedef Typedef2 = ({a: core::int*, required b: core::int*}) →* dynamic;
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class*
|
||||
: super core::Object::•()
|
||||
;
|
||||
method method({core::int* a = #C1, invalid-type int = #C1}) → dynamic {}
|
||||
method method({core::int* a = #C1, required core::int* b = #C1, required final core::int* c = #C1, required covariant final core::int* d = #C1}) → dynamic {}
|
||||
}
|
||||
static field ({a: core::int*, int: invalid-type}) →* dynamic field;
|
||||
static method method({core::int* a = #C1, invalid-type int = #C1}) → dynamic {}
|
||||
static field ({a: core::int*, required b: core::int*}) →* dynamic field;
|
||||
static method method({core::int* a = #C1, required core::int* b = #C1, required final core::int* c = #C1}) → dynamic {}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
|
|
|
@ -1,72 +1,17 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:5:29: Error: Expected '}' before this.
|
||||
// method({int a, required int b, required final int c}) {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:8:31: Error: Expected '}' before this.
|
||||
// method({int a, required int b, required final int c, required covariant final int d}) {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:12:50: Error: Expected '}' before this.
|
||||
// typedef Typedef1 = Function({int a, required int b});
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:14:39: Error: Expected '}' before this.
|
||||
// typedef Typedef2({int a, required int b});
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:16:31: Error: Expected '}' before this.
|
||||
// Function({int a, required int b}) field;
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:5:16: Warning: Type 'required' not found.
|
||||
// method({int a, required int b, required final int c}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:8:18: Warning: Type 'required' not found.
|
||||
// method({int a, required int b, required final int c, required covariant final int d}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:12:37: Warning: Type 'required' not found.
|
||||
// typedef Typedef1 = Function({int a, required int b});
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:14:26: Warning: Type 'required' not found.
|
||||
// typedef Typedef2({int a, required int b});
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:16:18: Warning: Type 'required' not found.
|
||||
// Function({int a, required int b}) field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:5:16: Warning: 'required' isn't a type.
|
||||
// method({int a, required int b, required final int c}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:8:18: Warning: 'required' isn't a type.
|
||||
// method({int a, required int b, required final int c, required covariant final int d}) {}
|
||||
// ^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/nnbd/required.dart:16:18: Warning: 'required' isn't a type.
|
||||
// Function({int a, required int b}) field;
|
||||
// ^^^^^^^^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
typedef Typedef1 = ({a: core::int*, int: invalid-type}) →* dynamic;
|
||||
typedef Typedef2 = ({a: core::int*, int: invalid-type}) →* dynamic;
|
||||
typedef Typedef1 = ({a: core::int*, required b: core::int*}) →* dynamic;
|
||||
typedef Typedef2 = ({a: core::int*, required b: core::int*}) →* dynamic;
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class*
|
||||
: super core::Object::•()
|
||||
;
|
||||
method method({core::int* a = #C1, invalid-type int = #C1}) → dynamic {}
|
||||
method method({core::int* a = #C1, required core::int* b = #C1, required final core::int* c = #C1, required covariant final core::int* d = #C1}) → dynamic {}
|
||||
}
|
||||
static field ({a: core::int*, int: invalid-type}) →* dynamic field;
|
||||
static method method({core::int* a = #C1, invalid-type int = #C1}) → dynamic {}
|
||||
static field ({a: core::int*, required b: core::int*}) →* dynamic field;
|
||||
static method method({core::int* a = #C1, required core::int* b = #C1, required final core::int* c = #C1}) → dynamic {}
|
||||
static method main() → dynamic {}
|
||||
|
||||
constants {
|
||||
|
|
1
pkg/front_end/testcases/nnbd/test.options
Normal file
1
pkg/front_end/testcases/nnbd/test.options
Normal file
|
@ -0,0 +1 @@
|
|||
--enable-experiment=non-nullable
|
|
@ -2,17 +2,15 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/regress/issue_31180.dart:6:14: Error: The method '[]' isn't defined for the class 'Null'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named '[]'.
|
||||
// pkg/front_end/testcases/regress/issue_31180.dart:6:16: Error: Expected an identifier, but got '['.
|
||||
// return null?.[1];
|
||||
// ^^
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
static method bad() → dynamic {
|
||||
return invalid-expression "pkg/front_end/testcases/regress/issue_31180.dart:6:14: Error: The method '[]' isn't defined for the class 'Null'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named '[]'.
|
||||
return invalid-expression "pkg/front_end/testcases/regress/issue_31180.dart:6:16: Error: Expected an identifier, but got '['.
|
||||
return null?.[1];
|
||||
^^";
|
||||
^";
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -2,17 +2,15 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/regress/issue_31180.dart:6:14: Error: The method '[]' isn't defined for the class 'Null'.
|
||||
// Try correcting the name to the name of an existing method, or defining a method named '[]'.
|
||||
// pkg/front_end/testcases/regress/issue_31180.dart:6:16: Error: Expected an identifier, but got '['.
|
||||
// return null?.[1];
|
||||
// ^^
|
||||
// ^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
static method bad() → dynamic {
|
||||
return invalid-expression "pkg/front_end/testcases/regress/issue_31180.dart:6:14: Error: The method '[]' isn't defined for the class 'Null'.
|
||||
Try correcting the name to the name of an existing method, or defining a method named '[]'.
|
||||
return invalid-expression "pkg/front_end/testcases/regress/issue_31180.dart:6:16: Error: Expected an identifier, but got '['.
|
||||
return null?.[1];
|
||||
^^";
|
||||
^";
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# Kernel ASTs directly, that is, code in pkg/fasta/lib/src/kernel/ with
|
||||
# strong-mode enabled.
|
||||
|
||||
extensions/extension_methods: RuntimeError
|
||||
general/abstract_members: TypeCheckError
|
||||
general/accessors: RuntimeError
|
||||
general/ambiguous_exports: RuntimeError # Expected, this file exports two main methods.
|
||||
|
@ -23,7 +24,6 @@ general/duplicated_declarations: TypeCheckError
|
|||
general/duplicated_field_initializer: RuntimeError
|
||||
general/dynamic_and_void: InstrumentationMismatch # Test assumes Dart 1.0 semantics
|
||||
general/expressions: RuntimeError
|
||||
general/extension_methods: RuntimeError
|
||||
general/external_import: RuntimeError # The native extension to import doesn't exist. This is ok.
|
||||
general/fallthrough: ExpectationFileMismatch
|
||||
general/ignore_function: TypeCheckError
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
expression/eval: TextSerializationFailure # Was: Pass
|
||||
expression/main: TextSerializationFailure # Was: Pass
|
||||
extensions/explicit_this: TextSerializationFailure
|
||||
extensions/extension_methods: TextSerializationFailure
|
||||
extensions/implicit_this: TextSerializationFailure
|
||||
extensions/direct_instance_access: TextSerializationFailure
|
||||
extensions/direct_static_access: TextSerializationFailure
|
||||
|
@ -103,7 +104,6 @@ general/escape: TextSerializationFailure # Was: Pass
|
|||
general/export_main: TextSerializationFailure # Was: Pass
|
||||
general/export_test: TextSerializationFailure # Was: Pass
|
||||
general/expressions: TextSerializationFailure # Was: RuntimeError
|
||||
general/extension_methods: TextSerializationFailure
|
||||
general/external: TextSerializationFailure # Was: Pass
|
||||
general/external_import: TextSerializationFailure # Was: RuntimeError # The native extension to import doesn't exist. This is ok.
|
||||
general/fallthrough: ExpectationFileMismatch
|
||||
|
|
Loading…
Reference in a new issue