[cfe] Allow experiments only in current sdk version

Experiments that have not be enabled by default should only be allowed
in the current version of the sdk.

Closes #45460

Change-Id: I159f390ac85fe37943920717ce11a4c817d5b4a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193480
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This commit is contained in:
Johnni Winther
2021-03-31 15:20:08 +00:00
committed by commit-bot@chromium.org
parent 19ab1fd800
commit 1eda15854d
109 changed files with 2047 additions and 1922 deletions
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//@dart=2.12
//@dart=2.13
/*member: main:ignore*/
void main() {
@@ -133,6 +133,7 @@ main() {
methodName: 'foo',
disableTypeInference: false,
enableTripleShift: true,
soundNullSafety: true,
check: checkerForAbsentPresent(test));
}
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.12
// @dart = 2.13
/*member: main:[null]*/
main() {
@@ -1,7 +1,8 @@
// @dart = 2.7
class MyClass {
MyClass();
// @dart = 2.7
@pragma('dart2js:noInline')
set internalSetter(int v) {
/*7:MyClass.internalSetter*/ throw "error";
@@ -31,7 +31,8 @@ import 'experimental_flags.dart' as flags
show
getExperimentEnabledVersionInLibrary,
isExperimentEnabled,
isExperimentEnabledInLibrary;
isExperimentEnabledInLibrary,
isExperimentEnabledInLibraryByVersion;
import 'file_system.dart' show FileSystem;
@@ -299,6 +300,17 @@ class CompilerOptions {
experimentReleasedVersionForTesting);
}
bool isExperimentEnabledInLibraryByVersion(
ExperimentalFlag flag, Uri importUri, Version version) {
return flags.isExperimentEnabledInLibraryByVersion(flag, importUri, version,
explicitExperimentalFlags: explicitExperimentalFlags,
defaultExperimentFlagsForTesting: defaultExperimentFlagsForTesting,
allowedExperimentalFlags: allowedExperimentalFlagsForTesting,
experimentEnabledVersionForTesting: experimentEnabledVersionForTesting,
experimentReleasedVersionForTesting:
experimentReleasedVersionForTesting);
}
bool equivalent(CompilerOptions other,
{bool ignoreOnDiagnostic: true,
bool ignoreVerbose: true,
@@ -182,3 +182,71 @@ Version getExperimentEnabledVersionInLibrary(ExperimentalFlag flag,
assert(version != null, "No version for enabling $flag in $canonicalUri.");
return version;
}
bool isExperimentEnabledInLibraryByVersion(
ExperimentalFlag flag, Uri canonicalUri, Version version,
{Map<ExperimentalFlag, bool> defaultExperimentFlagsForTesting,
Map<ExperimentalFlag, bool> explicitExperimentalFlags,
AllowedExperimentalFlags allowedExperimentalFlags,
Map<ExperimentalFlag, Version> experimentEnabledVersionForTesting,
Map<ExperimentalFlag, Version> experimentReleasedVersionForTesting}) {
assert(defaultExperimentalFlags.containsKey(flag),
"No default value for $flag.");
assert(expiredExperimentalFlags.containsKey(flag),
"No expired value for $flag.");
if (expiredExperimentalFlags[flag]) {
return defaultExperimentalFlags[flag];
}
bool enabledByDefault;
if (defaultExperimentFlagsForTesting != null) {
enabledByDefault = defaultExperimentFlagsForTesting[flag];
}
enabledByDefault ??= defaultExperimentalFlags[flag];
bool enabledExplicitly = explicitExperimentalFlags[flag] ?? false;
allowedExperimentalFlags ??= defaultAllowedExperimentalFlags;
Set<ExperimentalFlag> allowedFlags;
bool enabledByAllowed = false;
if (canonicalUri.scheme == 'dart') {
allowedFlags = allowedExperimentalFlags.forSdkLibrary(canonicalUri.path);
} else if (canonicalUri.scheme == 'package') {
int index = canonicalUri.path.indexOf('/');
String packageName;
if (index >= 0) {
packageName = canonicalUri.path.substring(0, index);
} else {
packageName = canonicalUri.path;
}
allowedFlags = allowedExperimentalFlags.forPackage(packageName);
}
if (allowedFlags != null) {
enabledByAllowed = allowedFlags.contains(flag);
}
if (enabledByDefault || enabledExplicitly || enabledByAllowed) {
// The feature is enabled depending on the library language version.
Version enabledVersion;
if (!enabledByDefault || enabledExplicitly || enabledByAllowed) {
// If the feature is not enabled by default or is enabled by the allowed
// list, use the experiment release version.
if (experimentReleasedVersionForTesting != null) {
enabledVersion = experimentReleasedVersionForTesting[flag];
}
enabledVersion ??= experimentReleasedVersion[flag];
} else {
// If the feature is enabled by default and is not enabled by the allowed
// list use the enabled version.
if (experimentEnabledVersionForTesting != null) {
enabledVersion = experimentEnabledVersionForTesting[flag];
}
enabledVersion ??= experimentEnabledVersion[flag];
}
return version >= enabledVersion;
} else {
// The feature is not enabled, regardless of library language version.
return false;
}
}
@@ -147,9 +147,10 @@ Future<bool> uriUsesLegacyLanguageVersion(
if (SourceLibraryBuilder.isOptOutTest(uri)) return true;
VersionAndPackageUri versionAndLibraryUri =
await languageVersionForUri(uri, options);
return (versionAndLibraryUri.version <
options.getExperimentEnabledVersionInLibrary(
ExperimentalFlag.nonNullable, versionAndLibraryUri.packageUri));
return !options.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.nonNullable,
versionAndLibraryUri.packageUri,
versionAndLibraryUri.version);
}
class VersionAndPackageUri {
@@ -401,6 +401,11 @@ class ProcessedOptions {
return _raw.getExperimentEnabledVersionInLibrary(flag, importUri);
}
bool isExperimentEnabledInLibraryByVersion(
flags.ExperimentalFlag flag, Uri importUri, Version version) {
return _raw.isExperimentEnabledInLibraryByVersion(flag, importUri, version);
}
Component _validateNullSafetyMode(Component component) {
if (component.mode == NonNullableByDefaultCompiledMode.Invalid) {
throw new FormatException(
@@ -8,7 +8,7 @@ library fasta.library_builder;
import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
import 'package:kernel/ast.dart' show Library, Nullability, Version;
import 'package:kernel/ast.dart' show Library, Nullability;
import '../combinator.dart' show Combinator;
@@ -55,23 +55,6 @@ abstract class LibraryBuilder implements ModifierBuilder {
bool mayImplementRestrictedTypes;
/// Set the language version to a specific non-null [version].
///
/// If the language version has previously been explicitly set set (i.e. with
/// [explicit] set to true), any subsequent call (explicit or not) should be
/// ignored.
/// Multiple calls with [explicit] set to false should be allowed though.
///
/// The main idea is that the .packages file specifies a default language
/// version, but that the library can have source code that specifies another
/// one which should be supported, but specifying several in code should not
/// change anything.
///
/// [offset] and [length] refers to the offset and length of the source code
/// specifying the language version.
void setLanguageVersion(Version version,
{int offset: 0, int length, bool explicit});
bool get isPart;
Loader get loader;
@@ -224,27 +207,6 @@ abstract class LibraryBuilderImpl extends ModifierBuilderImpl
@override
bool get isSynthetic => false;
/// Set the language version to a specific non-null major and minor version.
///
/// If [version] is null (and no other version has been explicitly set) a
/// problem is issued.
///
/// If the language version has previously been explicitly set set (i.e. with
/// [explicit] set to true), any subsequent call (explicit or not) should be
/// ignored.
/// Multiple calls with [explicit] set to false should be allowed though.
///
/// The main idea is that the .packages file specifies a default language
/// version, but that the library can have source code that specifies another
/// one which should be supported, but specifying several in code should not
/// change anything.
///
/// [offset] and [length] refers to the offset and length of the source code
/// specifying the language version.
@override
void setLanguageVersion(Version version,
{int offset: 0, int length, bool explicit});
@override
Builder get parent => null;
@@ -28,8 +28,7 @@ import 'package:kernel/ast.dart'
StaticGet,
StringConstant,
StringLiteral,
Typedef,
Version;
Typedef;
import '../builder/builder.dart';
import '../builder/class_builder.dart';
@@ -139,10 +138,6 @@ class DillLibraryBuilder extends LibraryBuilderImpl {
@override
bool get isNonNullableByDefault => library.isNonNullableByDefault;
@override
void setLanguageVersion(Version version,
{int offset: 0, int length, bool explicit}) {}
@override
Uri get importUri => library.importUri;
@@ -17,6 +17,8 @@ import '../builder/class_builder.dart';
import '../problems.dart' show unsupported;
import '../source/source_library_builder.dart' show LanguageVersion;
import '../target_implementation.dart' show TargetImplementation;
import '../ticker.dart' show Ticker;
@@ -66,6 +68,7 @@ class DillTarget extends TargetImplementation {
Uri uri,
Uri fileUri,
Uri packageUri,
LanguageVersion packageLanguageVersion,
LibraryBuilder origin,
Library referencesFrom,
bool referenceIsPartOwner) {
@@ -119,7 +119,8 @@ import 'kernel/kernel_target.dart' show KernelTarget;
import 'library_graph.dart' show LibraryGraph;
import 'source/source_library_builder.dart' show SourceLibraryBuilder;
import 'source/source_library_builder.dart'
show ImplicitLanguageVersion, SourceLibraryBuilder;
import 'ticker.dart' show Ticker;
@@ -1883,12 +1884,12 @@ class IncrementalCompiler implements IncrementalKernelGenerator {
libraryUri,
debugExprUri,
/*packageUri*/ null,
new ImplicitLanguageVersion(libraryBuilder.library.languageVersion),
userCode.loader,
null,
scope: libraryBuilder.scope.createNestedScope("expression"),
nameOrigin: libraryBuilder.library,
);
debugLibrary.setLanguageVersion(libraryBuilder.library.languageVersion);
ticker.logMs("Created debug library");
if (libraryBuilder is DillLibraryBuilder) {
@@ -9,38 +9,7 @@ library fasta.kernel_target;
import 'package:front_end/src/api_prototype/experimental_flags.dart';
import 'package:front_end/src/fasta/dill/dill_library_builder.dart'
show DillLibraryBuilder;
import 'package:kernel/ast.dart'
show
Arguments,
CanonicalName,
Class,
Component,
Constructor,
DartType,
EmptyStatement,
Expression,
Field,
FieldInitializer,
FunctionNode,
Initializer,
InterfaceType,
InvalidInitializer,
InvalidType,
Library,
Name,
NamedExpression,
NonNullableByDefaultCompiledMode,
NullLiteral,
Procedure,
RedirectingInitializer,
Reference,
Source,
SuperInitializer,
Supertype,
TypeParameter,
TypeParameterType,
VariableDeclaration,
VariableGet;
import 'package:kernel/ast.dart';
import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
import 'package:kernel/clone.dart' show CloneVisitorNotMembers;
import 'package:kernel/core_types.dart';
@@ -51,7 +20,7 @@ import 'package:kernel/target/targets.dart' show DiagnosticReporter;
import 'package:kernel/transformations/value_class.dart' as valueClass;
import 'package:kernel/type_algebra.dart' show substitute;
import 'package:kernel/type_environment.dart' show TypeEnvironment;
import 'package:package_config/package_config.dart';
import 'package:package_config/package_config.dart' hide LanguageVersion;
import '../../api_prototype/file_system.dart' show FileSystem;
import '../../base/nnbd_mode.dart';
@@ -102,7 +71,8 @@ import '../messages.dart'
import '../problems.dart' show unhandled;
import '../scope.dart' show AmbiguousBuilder;
import '../source/source_class_builder.dart' show SourceClassBuilder;
import '../source/source_library_builder.dart' show SourceLibraryBuilder;
import '../source/source_library_builder.dart'
show LanguageVersion, SourceLibraryBuilder;
import '../source/source_loader.dart' show SourceLoader;
import '../target_implementation.dart' show TargetImplementation;
import '../uri_translator.dart' show UriTranslator;
@@ -246,6 +216,7 @@ class KernelTarget extends TargetImplementation {
Uri uri,
Uri fileUri,
Uri packageUri,
LanguageVersion packageLanguageVersion,
SourceLibraryBuilder origin,
Library referencesFrom,
bool referenceIsPartOwner) {
@@ -295,7 +266,8 @@ class KernelTarget extends TargetImplementation {
return builder;
}
}
return new SourceLibraryBuilder(uri, fileUri, packageUri, loader, origin,
return new SourceLibraryBuilder(
uri, fileUri, packageUri, packageLanguageVersion, loader, origin,
referencesFrom: referencesFrom,
referenceIsPartOwner: referenceIsPartOwner);
}
+44 -9
View File
@@ -34,12 +34,21 @@ import 'messages.dart'
noLength,
SummaryTemplate,
Template,
messageLanguageVersionInvalidInDotPackages,
messagePlatformPrivateLibraryAccess,
templateInternalProblemContextSeverity,
templateLanguageVersionTooHigh,
templateSourceBodySummary;
import 'problems.dart' show internalProblem, unhandled;
import 'source/source_library_builder.dart' as src
show
LanguageVersion,
InvalidLanguageVersion,
ImplicitLanguageVersion,
SourceLibraryBuilder;
import 'target_implementation.dart' show TargetImplementation;
import 'ticker.dart' show Ticker;
@@ -144,9 +153,9 @@ abstract class Loader {
packageForLanguageVersion =
target.uriTranslator.packages.packageOf(fileUri);
}
bool hasPackageSpecifiedLanguageVersion = false;
Version version;
src.LanguageVersion packageLanguageVersion;
Uri packageUri;
Message packageLanguageVersionProblem;
if (packageForLanguageVersion != null) {
Uri importUri = origin?.importUri ?? uri;
if (importUri.scheme != 'dart' &&
@@ -156,24 +165,50 @@ abstract class Loader {
new Uri(scheme: 'package', path: packageForLanguageVersion.name);
}
if (packageForLanguageVersion.languageVersion != null) {
hasPackageSpecifiedLanguageVersion = true;
if (packageForLanguageVersion.languageVersion
is! InvalidLanguageVersion) {
version = new Version(
is InvalidLanguageVersion) {
packageLanguageVersionProblem =
messageLanguageVersionInvalidInDotPackages;
packageLanguageVersion = new src.InvalidLanguageVersion(
fileUri, 0, noLength, target.currentSdkVersion, false);
} else {
Version version = new Version(
packageForLanguageVersion.languageVersion.major,
packageForLanguageVersion.languageVersion.minor);
if (version > target.currentSdkVersion) {
packageLanguageVersionProblem =
templateLanguageVersionTooHigh.withArguments(
target.currentSdkVersion.major,
target.currentSdkVersion.minor);
packageLanguageVersion = new src.InvalidLanguageVersion(
fileUri, 0, noLength, target.currentSdkVersion, false);
} else {
packageLanguageVersion = new src.ImplicitLanguageVersion(version);
}
}
}
}
LibraryBuilder library = target.createLibraryBuilder(uri, fileUri,
packageUri, origin, referencesFrom, referenceIsPartOwner);
packageLanguageVersion ??=
new src.ImplicitLanguageVersion(target.currentSdkVersion);
LibraryBuilder library = target.createLibraryBuilder(
uri,
fileUri,
packageUri,
packageLanguageVersion,
origin,
referencesFrom,
referenceIsPartOwner);
if (library == null) {
throw new StateError("createLibraryBuilder for uri $uri, "
"fileUri $fileUri returned null.");
}
if (hasPackageSpecifiedLanguageVersion) {
library.setLanguageVersion(version, explicit: false);
if (packageLanguageVersionProblem != null &&
library is src.SourceLibraryBuilder) {
library.addPostponedProblem(
packageLanguageVersionProblem, 0, noLength, library.fileUri);
}
if (uri.scheme == "dart" && uri.path == "core") {
coreLibrary = library;
}
@@ -231,6 +231,17 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
List<FieldBuilder> _implicitlyTypedFields;
/// The language version of this library as defined by the language version
/// of the package it belongs to, if present, or the current language version
/// otherwise.
///
/// This language version we be used as the language version for the library
/// if the library does not contain an explicit @dart= annotation.
final LanguageVersion packageLanguageVersion;
/// The actual language version of this library. This is initially the
/// [packageLanguageVersion] but will be updated if the library contains
/// an explicit @dart= language version annotation.
LanguageVersion _languageVersion;
bool postponedProblemsIssued = false;
@@ -247,6 +258,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
SourceLoader loader,
Uri fileUri,
Uri packageUri,
LanguageVersion packageLanguageVersion,
Scope scope,
SourceLibraryBuilder actualOrigin,
Library library,
@@ -257,6 +269,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
loader,
fileUri,
packageUri,
packageLanguageVersion,
new TypeParameterScopeBuilder.library(),
scope ?? new Scope.top(),
actualOrigin,
@@ -268,13 +281,14 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
this.loader,
this.fileUri,
this._packageUri,
this.packageLanguageVersion,
this.libraryDeclaration,
this.importScope,
this.actualOrigin,
this.library,
this._nameOrigin,
this.referencesFrom)
: _languageVersion = new ImplicitLanguageVersion(library.languageVersion),
: _languageVersion = packageLanguageVersion,
currentTypeParameterScopeBuilder = libraryDeclaration,
referencesFromIndexed =
referencesFrom == null ? null : new IndexedLibrary(referencesFrom),
@@ -303,17 +317,21 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
bool _enableExtensionTypesInLibrary;
bool get enableConstFunctionsInLibrary => _enableConstFunctionsInLibrary ??=
loader.target.isExperimentEnabledInLibrary(
ExperimentalFlag.constFunctions, _packageUri ?? importUri);
loader.target.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.constFunctions,
_packageUri ?? importUri,
languageVersion.version);
bool get enableVarianceInLibrary =>
_enableVarianceInLibrary ??= loader.target.isExperimentEnabledInLibrary(
ExperimentalFlag.variance, _packageUri ?? importUri);
bool get enableVarianceInLibrary => _enableVarianceInLibrary ??= loader.target
.isExperimentEnabledInLibraryByVersion(ExperimentalFlag.variance,
_packageUri ?? importUri, languageVersion.version);
bool get enableNonfunctionTypeAliasesInLibrary =>
_enableNonfunctionTypeAliasesInLibrary ??= loader.target
.isExperimentEnabledInLibrary(ExperimentalFlag.nonfunctionTypeAliases,
_packageUri ?? importUri);
.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.nonfunctionTypeAliases,
_packageUri ?? importUri,
languageVersion.version);
/// Returns `true` if the 'non-nullable' experiment is enabled for this
/// library.
@@ -331,46 +349,54 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
ExperimentalFlag.nonNullable, _packageUri ?? importUri);
bool get enableTripleShiftInLibrary => _enableTripleShiftInLibrary ??=
loader.target.isExperimentEnabledInLibrary(
ExperimentalFlag.tripleShift, _packageUri ?? importUri);
loader.target.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.tripleShift,
_packageUri ?? importUri,
languageVersion.version);
bool get enableExtensionMethodsInLibrary =>
_enableExtensionMethodsInLibrary ??= loader.target
.isExperimentEnabledInLibrary(
ExperimentalFlag.extensionMethods, _packageUri ?? importUri);
.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.extensionMethods,
_packageUri ?? importUri,
languageVersion.version);
bool get enableGenericMetadataInLibrary => _enableGenericMetadataInLibrary ??=
loader.target.isExperimentEnabledInLibrary(
ExperimentalFlag.genericMetadata, _packageUri ?? importUri);
loader.target.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.genericMetadata,
_packageUri ?? importUri,
languageVersion.version);
bool get enableExtensionTypesInLibrary => _enableExtensionTypesInLibrary ??=
loader.target.isExperimentEnabledInLibrary(
ExperimentalFlag.extensionTypes, _packageUri ?? importUri);
loader.target.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.extensionTypes,
_packageUri ?? importUri,
languageVersion.version);
void updateLibraryNNBDSettings() {
void _updateLibraryNNBDSettings() {
library.isNonNullableByDefault = isNonNullableByDefault;
if (enableNonNullableInLibrary) {
switch (loader.nnbdMode) {
case NnbdMode.Weak:
library.nonNullableByDefaultCompiledMode =
NonNullableByDefaultCompiledMode.Weak;
break;
case NnbdMode.Strong:
library.nonNullableByDefaultCompiledMode =
NonNullableByDefaultCompiledMode.Strong;
break;
case NnbdMode.Agnostic:
library.nonNullableByDefaultCompiledMode =
NonNullableByDefaultCompiledMode.Agnostic;
break;
}
} else {
library.nonNullableByDefaultCompiledMode =
NonNullableByDefaultCompiledMode.Weak;
switch (loader.nnbdMode) {
case NnbdMode.Weak:
library.nonNullableByDefaultCompiledMode =
NonNullableByDefaultCompiledMode.Weak;
break;
case NnbdMode.Strong:
library.nonNullableByDefaultCompiledMode =
NonNullableByDefaultCompiledMode.Strong;
break;
case NnbdMode.Agnostic:
library.nonNullableByDefaultCompiledMode =
NonNullableByDefaultCompiledMode.Agnostic;
break;
}
}
SourceLibraryBuilder(Uri uri, Uri fileUri, Uri packageUri, Loader loader,
SourceLibraryBuilder(
Uri uri,
Uri fileUri,
Uri packageUri,
LanguageVersion packageLanguageVersion,
Loader loader,
SourceLibraryBuilder actualOrigin,
{Scope scope,
Library target,
@@ -381,6 +407,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
loader,
fileUri,
packageUri,
packageLanguageVersion,
scope,
actualOrigin,
target ??
@@ -390,7 +417,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
reference: referenceIsPartOwner == true
? null
: referencesFrom?.reference)
..setLanguageVersion(loader.target.currentSdkVersion)),
..setLanguageVersion(packageLanguageVersion.version)),
nameOrigin,
referencesFrom,
referenceIsPartOwner);
@@ -425,7 +452,7 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
bool _ensureIsNonNullableByDefault() {
if (_isNonNullableByDefault == null) {
_isNonNullableByDefault = _computeIsNonNullableByDefault();
updateLibraryNNBDSettings();
_updateLibraryNNBDSettings();
}
return _isNonNullableByDefault;
}
@@ -458,9 +485,17 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
'vm/dart_2/', // in runtime/tests
];
LanguageVersion get languageVersion => _languageVersion;
LanguageVersion get languageVersion {
assert(
_languageVersion.isFinal,
"Attempting to read the language version of ${this} before has been "
"finalized.");
return _languageVersion;
}
void markLanguageVersionFinal() {
_languageVersion.isFinal = true;
_ensureIsNonNullableByDefault();
if (!isNonNullableByDefault &&
(loader.nnbdMode == NnbdMode.Strong ||
loader.nnbdMode == NnbdMode.Agnostic)) {
@@ -476,32 +511,29 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
NonNullableByDefaultCompiledMode.Invalid;
loader.hasInvalidNnbdModeLibrary = true;
}
_languageVersion.isFinal = true;
_ensureIsNonNullableByDefault();
}
@override
void setLanguageVersion(Version version,
{int offset: 0, int length: noLength, bool explicit: false}) {
assert(!_languageVersion.isFinal);
if (languageVersion.isExplicit) return;
if (version == null) {
addPostponedProblem(
messageLanguageVersionInvalidInDotPackages, offset, length, fileUri);
if (_languageVersion is ImplicitLanguageVersion) {
// If the package set an OK version, but the file set an invalid version
// we want to use the package version.
_languageVersion = new InvalidLanguageVersion(
fileUri, offset, length, explicit, loader.target.currentSdkVersion);
library.setLanguageVersion(_languageVersion.version);
}
/// Set the language version to an explicit major and minor version.
///
/// The default language version specified by the .packages file is passed
/// to the constructor, but the library can have source code that specifies
/// another one which should be supported.
///
/// Only the first registered language version is used.
///
/// [offset] and [length] refers to the offset and length of the source code
/// specifying the language version.
void registerExplicitLanguageVersion(Version version,
{int offset: 0, int length: noLength}) {
if (_languageVersion.isExplicit) {
// If more than once language version exists we use the first.
return;
}
assert(!_languageVersion.isFinal);
// If trying to set a language version that is higher than the current sdk
// version it's an error.
if (version > loader.target.currentSdkVersion) {
// If trying to set a language version that is higher than the current sdk
// version it's an error.
addPostponedProblem(
templateLanguageVersionTooHigh.withArguments(
loader.target.currentSdkVersion.major,
@@ -509,19 +541,15 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
offset,
length,
fileUri);
if (_languageVersion is ImplicitLanguageVersion) {
// If the package set an OK version, but the file set an invalid version
// we want to use the package version.
_languageVersion = new InvalidLanguageVersion(
fileUri, offset, length, explicit, loader.target.currentSdkVersion);
library.setLanguageVersion(_languageVersion.version);
}
return;
// If the package set an OK version, but the file set an invalid version
// we want to use the package version.
_languageVersion = new InvalidLanguageVersion(
fileUri, offset, length, packageLanguageVersion.version, true);
} else {
_languageVersion = new LanguageVersion(version, fileUri, offset, length);
}
_languageVersion =
new LanguageVersion(version, fileUri, offset, length, explicit);
library.setLanguageVersion(version);
library.setLanguageVersion(_languageVersion.version);
_languageVersion.isFinal = true;
}
ConstructorReferenceBuilder addConstructorReference(Object name,
@@ -4150,11 +4178,11 @@ class LanguageVersion {
final Uri fileUri;
final int charOffset;
final int charCount;
final bool isExplicit;
bool isFinal = false;
LanguageVersion(this.version, this.fileUri, this.charOffset, this.charCount,
this.isExplicit);
LanguageVersion(this.version, this.fileUri, this.charOffset, this.charCount);
bool get isExplicit => true;
bool get valid => true;
@@ -4177,12 +4205,12 @@ class InvalidLanguageVersion implements LanguageVersion {
final Uri fileUri;
final int charOffset;
final int charCount;
final bool isExplicit;
final Version version;
final bool isExplicit;
bool isFinal = false;
InvalidLanguageVersion(this.fileUri, this.charOffset, this.charCount,
this.isExplicit, this.version);
this.version, this.isExplicit);
@override
bool get valid => false;
@@ -205,24 +205,24 @@ class SourceLoader extends Loader {
Future<Token> tokenize(SourceLibraryBuilder library,
{bool suppressLexicalErrors: false}) async {
Uri uri = library.fileUri;
Uri fileUri = library.fileUri;
// Lookup the file URI in the cache.
List<int> bytes = sourceBytes[uri];
List<int> bytes = sourceBytes[fileUri];
if (bytes == null) {
// Error recovery.
if (uri.scheme == untranslatableUriScheme) {
if (fileUri.scheme == untranslatableUriScheme) {
Message message =
templateUntranslatableUri.withArguments(library.importUri);
library.addProblemAtAccessors(message);
bytes = synthesizeSourceForMissingFile(library.importUri, null);
} else if (!uri.hasScheme) {
} else if (!fileUri.hasScheme) {
return internalProblem(
templateInternalProblemUriMissingScheme.withArguments(uri),
templateInternalProblemUriMissingScheme.withArguments(fileUri),
-1,
library.importUri);
} else if (uri.scheme == SourceLibraryBuilder.MALFORMED_URI_SCHEME) {
} else if (fileUri.scheme == SourceLibraryBuilder.MALFORMED_URI_SCHEME) {
library.addProblemAtAccessors(messageExpectedUri);
bytes = synthesizeSourceForMissingFile(library.importUri, null);
}
@@ -230,7 +230,7 @@ class SourceLoader extends Loader {
Uint8List zeroTerminatedBytes = new Uint8List(bytes.length + 1);
zeroTerminatedBytes.setRange(0, bytes.length, bytes);
bytes = zeroTerminatedBytes;
sourceBytes[uri] = bytes;
sourceBytes[fileUri] = bytes;
}
}
@@ -239,30 +239,44 @@ class SourceLoader extends Loader {
// system.
List<int> rawBytes;
try {
rawBytes = await fileSystem.entityForUri(uri).readAsBytes();
rawBytes = await fileSystem.entityForUri(fileUri).readAsBytes();
} on FileSystemException catch (e) {
Message message = templateCantReadFile.withArguments(uri, e.message);
Message message =
templateCantReadFile.withArguments(fileUri, e.message);
library.addProblemAtAccessors(message);
rawBytes = synthesizeSourceForMissingFile(library.importUri, message);
}
Uint8List zeroTerminatedBytes = new Uint8List(rawBytes.length + 1);
zeroTerminatedBytes.setRange(0, rawBytes.length, rawBytes);
bytes = zeroTerminatedBytes;
sourceBytes[uri] = bytes;
sourceBytes[fileUri] = bytes;
byteCount += rawBytes.length;
}
ScannerResult result = scan(bytes,
includeComments: includeComments,
configuration: new ScannerConfiguration(
enableTripleShift: library.enableTripleShiftInLibrary,
enableExtensionMethods: library.enableExtensionMethodsInLibrary,
enableNonNullable: library.enableNonNullableInLibrary),
enableTripleShift: target.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.tripleShift,
library.importUri,
library.packageLanguageVersion.version),
enableExtensionMethods:
target.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.extensionMethods,
library.importUri,
library.packageLanguageVersion.version),
enableNonNullable: target.isExperimentEnabledInLibraryByVersion(
ExperimentalFlag.nonNullable,
library.importUri,
library.packageLanguageVersion.version) &&
!SourceLibraryBuilder.isOptOutTest(library.importUri)),
languageVersionChanged:
(Scanner scanner, LanguageVersionToken version) {
if (!suppressLexicalErrors) {
library.setLanguageVersion(new Version(version.major, version.minor),
offset: version.offset, length: version.length, explicit: true);
library.registerExplicitLanguageVersion(
new Version(version.major, version.minor),
offset: version.offset,
length: version.length);
}
scanner.configuration = new ScannerConfiguration(
enableTripleShift: library.enableTripleShiftInLibrary,
@@ -295,7 +309,7 @@ class SourceLoader extends Loader {
if (!suppressLexicalErrors) {
ErrorToken error = token;
library.addProblem(error.assertionMessage, offsetForToken(token),
lengthForToken(token), uri);
lengthForToken(token), fileUri);
}
token = token.next;
}
@@ -17,6 +17,7 @@ import '../base/processed_options.dart' show ProcessedOptions;
import 'builder/class_builder.dart';
import 'builder/library_builder.dart';
import 'builder/member_builder.dart';
import 'source/source_library_builder.dart' show LanguageVersion;
import 'compiler_context.dart' show CompilerContext;
@@ -66,6 +67,12 @@ abstract class TargetImplementation extends Target {
return _options.getExperimentEnabledVersionInLibrary(flag, importUri);
}
bool isExperimentEnabledInLibraryByVersion(
ExperimentalFlag flag, Uri importUri, Version version) {
return _options.isExperimentEnabledInLibraryByVersion(
flag, importUri, version);
}
/// Returns `true` if the [flag] is enabled by default.
bool isExperimentEnabledByDefault(ExperimentalFlag flag) {
return _options.isExperimentEnabledByDefault(flag);
@@ -100,10 +107,15 @@ abstract class TargetImplementation extends Target {
/// For libraries with a 'package:' [importUri], the package path must match
/// the path in the [importUri]. For libraries with a 'dart:' [importUri] the
/// [packageUri] must be `null`.
///
/// [packageLanguageVersion] is the language version defined by the package
/// which the library belongs to, or the current sdk version if the library
/// doesn't belong to a package.
LibraryBuilder createLibraryBuilder(
Uri uri,
Uri fileUri,
Uri packageUri,
LanguageVersion packageLanguageVersion,
covariant LibraryBuilder origin,
Library referencesFrom,
bool referenceIsPartOwner);
+1
View File
@@ -786,6 +786,7 @@ UndefinedExtensionOperator/analyzerCode: Fail
UndefinedExtensionOperator/example: Fail
UndefinedExtensionSetter/analyzerCode: Fail
UndefinedExtensionSetter/example: Fail
UnexpectedModifierInNonNnbd/part_wrapped_script: Fail # Test requires @dart= annotation
UnexpectedToken/part_wrapped_script1: Fail
UnexpectedToken/script1: Fail
UnmatchedToken/part_wrapped_script1: Fail
+3 -2
View File
@@ -5029,8 +5029,9 @@ UnexpectedModifierInNonNnbd:
template: "The modifier '#lexeme' is only available in null safe libraries."
exampleAllowMoreCodes: true
analyzerCode: UNEXPECTED_TOKEN
script:
- "late int x;"
script: |
// @dart=2.9
late int x;
CompilingWithSoundNullSafety:
template: "Compiling with sound null safety"
@@ -107,6 +107,7 @@ test(
bool hadDiagnostic = false;
options.onDiagnostic = (DiagnosticMessage message) {
print(message.plainTextFormatted);
hadDiagnostic = true;
};
@@ -27,7 +27,8 @@ import 'package:kernel/ast.dart'
TypeParameter,
VariableDeclaration,
VariableGet,
VoidType;
VoidType,
defaultLanguageVersion;
import 'package:kernel/target/targets.dart' show NoneTarget, TargetFlags;
@@ -53,7 +54,7 @@ import 'package:front_end/src/fasta/kernel/expression_generator.dart';
import 'package:front_end/src/fasta/kernel/body_builder.dart' show BodyBuilder;
import 'package:front_end/src/fasta/source/source_library_builder.dart'
show SourceLibraryBuilder;
show ImplicitLanguageVersion, SourceLibraryBuilder;
void check(String expected, Generator generator) {
Expect.stringEquals(expected, "$generator");
@@ -74,6 +75,7 @@ main() async {
uri,
uri,
/*packageUri*/ null,
new ImplicitLanguageVersion(defaultLanguageVersion),
new KernelTarget(
null,
false,
@@ -1,7 +1,7 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative2 = 2 >>> -1;
const int shiftNegative3 = 2 >> -1;
@@ -23,7 +23,6 @@ const int binaryAnd = 63 & 106;
const int binaryXor = 63 ^ 21;
const int binaryShift1 = 21 << 1;
// These aren't currently defined on int :(.
const int binaryShift2 = 84 >>> 1;
const int binaryShift3 = 21 >>> 64;
@@ -36,7 +35,8 @@ const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const dynamic nil = null;
const int doubleTruncateDivNull = 84.2 ~/ nil;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
@@ -1,4 +1,3 @@
// @dart = 2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative2 = 2 >>> -1;
const int shiftNegative3 = 2 >> -1;
@@ -28,7 +27,8 @@ const bool binaryGreaterEqual = 42 >= 42;
const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const dynamic nil = null;
const int doubleTruncateDivNull = 84.2 ~/ nil;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
const int bigNumber = 0x8000000000000000;
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -61,24 +61,24 @@ library;
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:38:40: Error: Constant evaluation error:
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:38:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:38:11: Context: While analyzing:
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:41:39: Error: Constant evaluation error:
@@ -94,43 +94,44 @@ library;
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* shiftNegative2 = invalid-expression "Binary operator '>>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
static const field core::int shiftNegative1 = invalid-expression "Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int shiftNegative2 = invalid-expression "Binary operator '>>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int shiftNegative3 = invalid-expression "Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int modZero = invalid-expression "Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int divZero = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: This couldn't be parsed.
static const field core::int intdivZero = invalid-expression "Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int unaryMinus = #C1;
static const field core::int unaryTilde = #C2;
static const field core::int unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C3;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift2 = #C3;
static const field core::int* binaryShift3 = #C4;
static const field core::int* binaryShift4 = #C3;
static const field core::int* binaryShift5 = #C5;
static const field core::bool* binaryLess = #C6;
static const field core::bool* binaryLessEqual = #C7;
static const field core::bool* binaryGreaterEqual = #C7;
static const field core::bool* binaryGreater = #C6;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C8;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int* bigNumber = #C9;
static const field core::int binaryPlus = #C3;
static const field core::int binaryMinus = #C3;
static const field core::int binaryTimes = #C3;
static const field core::double binaryDiv = #C3;
static const field core::int binaryTildeDiv = #C3;
static const field core::int binaryMod = #C3;
static const field core::int binaryOr = #C3;
static const field core::int binaryAnd = #C3;
static const field core::int binaryXor = #C3;
static const field core::int binaryShift1 = #C3;
static const field core::int binaryShift2 = #C3;
static const field core::int binaryShift3 = #C4;
static const field core::int binaryShift4 = #C3;
static const field core::int binaryShift5 = #C5;
static const field core::bool binaryLess = #C6;
static const field core::bool binaryLessEqual = #C7;
static const field core::bool binaryGreaterEqual = #C7;
static const field core::bool binaryGreater = #C6;
static const field core::int doubleTruncateDiv = #C3;
static const field core::int doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field dynamic nil = #C8;
static const field core::int doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double doubleNan = #C9;
static const field core::int doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int bigNumber = #C10;
static method main() → dynamic {}
constants {
@@ -141,6 +142,7 @@ constants {
#C5 = 4294967295.0
#C6 = false
#C7 = true
#C8 = NaN
#C9 = 9223372036854776000.0
#C8 = null
#C9 = NaN
#C10 = 9223372036854776000.0
}
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -14,43 +14,44 @@ library;
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = 2.{core::int::<<}(1.{core::int::unary-}(){() →* core::int*}){(core::int*) →* core::int*};
static const field core::int* shiftNegative2 = 2.{core::int::>>>}(1.{core::int::unary-}(){() →* core::int*}){(core::int*) →* core::int*};
static const field core::int* shiftNegative3 = 2.{core::int::>>}(1.{core::int::unary-}(){() →* core::int*}){(core::int*) →* core::int*};
static const field core::int* modZero = 2.{core::num::%}(0){(core::num*) →* core::int*};
static const field core::int* divZero = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
static const field core::int shiftNegative1 = 2.{core::int::<<}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
static const field core::int shiftNegative2 = 2.{core::int::>>>}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
static const field core::int shiftNegative3 = 2.{core::int::>>}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
static const field core::int modZero = 2.{core::num::%}(0){(core::num) → core::int};
static const field core::int divZero = let final Never #t1 = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^" in 2.{core::num::/}(0){(core::num*) →* core::double*} as{TypeError} core::int*;
static const field core::int* intdivZero = 2.{core::num::~/}(0){(core::num*) →* core::int*};
static const field core::int* unaryMinus = 2.{core::int::unary-}(){() →* core::int*};
static const field core::int* unaryTilde = 2.{core::int::~}(){() →* core::int*};
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: This couldn't be parsed.
^" in 2.{core::num::/}(0){(core::num) → core::double} as{TypeError,ForNonNullableByDefault} core::int;
static const field core::int intdivZero = 2.{core::num::~/}(0){(core::num) → core::int};
static const field core::int unaryMinus = 2.{core::int::unary-}(){() → core::int};
static const field core::int unaryTilde = 2.{core::int::~}(){() → core::int};
static const field core::int unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^"{dynamic}.+(2) as{TypeError,ForDynamic} core::int*;
static const field core::int* binaryPlus = 40.{core::num::+}(2){(core::num*) →* core::int*};
static const field core::int* binaryMinus = 44.{core::num::-}(2){(core::num*) →* core::int*};
static const field core::int* binaryTimes = 21.{core::num::*}(2){(core::num*) →* core::int*};
static const field core::double* binaryDiv = 84.{core::num::/}(2){(core::num*) →* core::double*};
static const field core::int* binaryTildeDiv = 84.{core::num::~/}(2){(core::num*) →* core::int*};
static const field core::int* binaryMod = 85.{core::num::%}(43){(core::num*) →* core::int*};
static const field core::int* binaryOr = 32.{core::int::|}(10){(core::int*) →* core::int*};
static const field core::int* binaryAnd = 63.{core::int::&}(106){(core::int*) →* core::int*};
static const field core::int* binaryXor = 63.{core::int::^}(21){(core::int*) →* core::int*};
static const field core::int* binaryShift1 = 21.{core::int::<<}(1){(core::int*) →* core::int*};
static const field core::int* binaryShift2 = 84.{core::int::>>>}(1){(core::int*) →* core::int*};
static const field core::int* binaryShift3 = 21.{core::int::>>>}(64){(core::int*) →* core::int*};
static const field core::int* binaryShift4 = 84.{core::int::>>}(1){(core::int*) →* core::int*};
static const field core::int* binaryShift5 = 1.{core::int::unary-}(){() →* core::int*}.{core::int::>>}(1){(core::int*) →* core::int*};
static const field core::bool* binaryLess = 42.{core::num::<}(42){(core::num*) →* core::bool*};
static const field core::bool* binaryLessEqual = 42.{core::num::<=}(42){(core::num*) →* core::bool*};
static const field core::bool* binaryGreaterEqual = 42.{core::num::>=}(42){(core::num*) →* core::bool*};
static const field core::bool* binaryGreater = 42.{core::num::>}(42){(core::num*) →* core::bool*};
static const field core::int* doubleTruncateDiv = 84.2.{core::double::~/}(2){(core::num*) →* core::int*};
static const field core::int* doubleTruncateDivZero = 84.2.{core::double::~/}(0){(core::num*) →* core::int*};
static const field core::int* doubleTruncateDivNull = 84.2.{core::double::~/}(null){(core::num*) →* core::int*};
static const field core::double* doubleNan = 0.{core::num::/}(0){(core::num*) →* core::double*};
static const field core::int* doubleTruncateDivNaN = 84.2.{core::double::~/}(self::doubleNan){(core::num*) →* core::int*};
static const field core::int* bigNumber = -9223372036854775808;
^"{dynamic}.+(2) as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
static const field core::int binaryPlus = 40.{core::num::+}(2){(core::num) → core::int};
static const field core::int binaryMinus = 44.{core::num::-}(2){(core::num) → core::int};
static const field core::int binaryTimes = 21.{core::num::*}(2){(core::num) → core::int};
static const field core::double binaryDiv = 84.{core::num::/}(2){(core::num) → core::double};
static const field core::int binaryTildeDiv = 84.{core::num::~/}(2){(core::num) → core::int};
static const field core::int binaryMod = 85.{core::num::%}(43){(core::num) → core::int};
static const field core::int binaryOr = 32.{core::int::|}(10){(core::int) → core::int};
static const field core::int binaryAnd = 63.{core::int::&}(106){(core::int) → core::int};
static const field core::int binaryXor = 63.{core::int::^}(21){(core::int) → core::int};
static const field core::int binaryShift1 = 21.{core::int::<<}(1){(core::int) → core::int};
static const field core::int binaryShift2 = 84.{core::int::>>>}(1){(core::int) → core::int};
static const field core::int binaryShift3 = 21.{core::int::>>>}(64){(core::int) → core::int};
static const field core::int binaryShift4 = 84.{core::int::>>}(1){(core::int) → core::int};
static const field core::int binaryShift5 = 1.{core::int::unary-}(){() → core::int}.{core::int::>>}(1){(core::int) → core::int};
static const field core::bool binaryLess = 42.{core::num::<}(42){(core::num) → core::bool};
static const field core::bool binaryLessEqual = 42.{core::num::<=}(42){(core::num) → core::bool};
static const field core::bool binaryGreaterEqual = 42.{core::num::>=}(42){(core::num) → core::bool};
static const field core::bool binaryGreater = 42.{core::num::>}(42){(core::num) → core::bool};
static const field core::int doubleTruncateDiv = 84.2.{core::double::~/}(2){(core::num) → core::int};
static const field core::int doubleTruncateDivZero = 84.2.{core::double::~/}(0){(core::num) → core::int};
static const field dynamic nil = null;
static const field core::int doubleTruncateDivNull = 84.2.{core::double::~/}(self::nil as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::int};
static const field core::double doubleNan = 0.{core::num::/}(0){(core::num) → core::double};
static const field core::int doubleTruncateDivNaN = 84.2.{core::double::~/}(self::doubleNan){(core::num) → core::int};
static const field core::int bigNumber = -9223372036854775808;
static method main() → dynamic
;
@@ -72,15 +73,16 @@ Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:21:25
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:22:26 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:23:26 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:24:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:27:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:28:29 -> DoubleConstant(0.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:30:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:31:29 -> DoubleConstant(4294967295.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:32:28 -> BoolConstant(false)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:33:33 -> BoolConstant(true)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:34:36 -> BoolConstant(true)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:35:31 -> BoolConstant(false)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:37:36 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:26:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:27:29 -> DoubleConstant(0.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:29:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:30:29 -> DoubleConstant(4294967295.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:31:28 -> BoolConstant(false)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:32:33 -> BoolConstant(true)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:33:36 -> BoolConstant(true)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:34:31 -> BoolConstant(false)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:36:36 -> DoubleConstant(42.0)
Evaluated: AsExpression @ org-dartlang-testcase:///number_folds.dart:39:43 -> NullConstant(null)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds.dart:40:27 -> DoubleConstant(NaN)
Evaluated: StaticGet @ org-dartlang-testcase:///number_folds.dart:41:42 -> DoubleConstant(NaN)
Extra constant evaluation: evaluated: 39, effectively constant: 27
Extra constant evaluation: evaluated: 40, effectively constant: 28
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -61,24 +61,24 @@ library;
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:38:40: Error: Constant evaluation error:
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:38:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:38:11: Context: While analyzing:
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:41:39: Error: Constant evaluation error:
@@ -94,43 +94,44 @@ library;
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* shiftNegative2 = invalid-expression "Binary operator '>>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
static const field core::int shiftNegative1 = invalid-expression "Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int shiftNegative2 = invalid-expression "Binary operator '>>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int shiftNegative3 = invalid-expression "Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int modZero = invalid-expression "Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int divZero = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: This couldn't be parsed.
static const field core::int intdivZero = invalid-expression "Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int unaryMinus = #C1;
static const field core::int unaryTilde = #C2;
static const field core::int unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C3;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift2 = #C3;
static const field core::int* binaryShift3 = #C4;
static const field core::int* binaryShift4 = #C3;
static const field core::int* binaryShift5 = #C5;
static const field core::bool* binaryLess = #C6;
static const field core::bool* binaryLessEqual = #C7;
static const field core::bool* binaryGreaterEqual = #C7;
static const field core::bool* binaryGreater = #C6;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C8;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int* bigNumber = #C9;
static const field core::int binaryPlus = #C3;
static const field core::int binaryMinus = #C3;
static const field core::int binaryTimes = #C3;
static const field core::double binaryDiv = #C3;
static const field core::int binaryTildeDiv = #C3;
static const field core::int binaryMod = #C3;
static const field core::int binaryOr = #C3;
static const field core::int binaryAnd = #C3;
static const field core::int binaryXor = #C3;
static const field core::int binaryShift1 = #C3;
static const field core::int binaryShift2 = #C3;
static const field core::int binaryShift3 = #C4;
static const field core::int binaryShift4 = #C3;
static const field core::int binaryShift5 = #C5;
static const field core::bool binaryLess = #C6;
static const field core::bool binaryLessEqual = #C7;
static const field core::bool binaryGreaterEqual = #C7;
static const field core::bool binaryGreater = #C6;
static const field core::int doubleTruncateDiv = #C3;
static const field core::int doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field dynamic nil = #C8;
static const field core::int doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double doubleNan = #C9;
static const field core::int doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int bigNumber = #C10;
static method main() → dynamic {}
constants {
@@ -141,6 +142,7 @@ constants {
#C5 = 4294967295.0
#C6 = false
#C7 = true
#C8 = NaN
#C9 = 9223372036854776000.0
#C8 = null
#C9 = NaN
#C10 = 9223372036854776000.0
}
@@ -0,0 +1,44 @@
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative3 = 2 >> -1;
const int modZero = 2 % 0;
const int divZero = 2 / 0;
const int intdivZero = 2 ~/ 0;
const int unaryMinus = -2;
const int unaryTilde = ~2;
const int unaryPlus = +2;
const int binaryPlus = 40 + 2;
const int binaryMinus = 44 - 2;
const int binaryTimes = 21 * 2;
const double binaryDiv = 84 / 2;
const int binaryTildeDiv = 84~/ 2;
const int binaryMod = 85 % 43;
const int binaryOr = 32 | 10;
const int binaryAnd = 63 & 106;
const int binaryXor = 63 ^ 21;
const int binaryShift1 = 21 << 1;
const int binaryShift4 = 84 >> 1;
const int binaryShift5 = -1 >> 1;
const bool binaryLess = 42 < 42;
const bool binaryLessEqual = 42 <= 42;
const bool binaryGreaterEqual = 42 >= 42;
const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
const int bigNumber = 0x8000000000000000;
main() {
}
@@ -0,0 +1,32 @@
// @dart = 2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative3 = 2 >> -1;
const int modZero = 2 % 0;
const int divZero = 2 / 0;
const int intdivZero = 2 ~/ 0;
const int unaryMinus = -2;
const int unaryTilde = ~2;
const int unaryPlus = +2;
const int binaryPlus = 40 + 2;
const int binaryMinus = 44 - 2;
const int binaryTimes = 21 * 2;
const double binaryDiv = 84 / 2;
const int binaryTildeDiv = 84~/ 2;
const int binaryMod = 85 % 43;
const int binaryOr = 32 | 10;
const int binaryAnd = 63 & 106;
const int binaryXor = 63 ^ 21;
const int binaryShift1 = 21 << 1;
const int binaryShift4 = 84 >> 1;
const int binaryShift5 = -1 >> 1;
const bool binaryLess = 42 < 42;
const bool binaryLessEqual = 42 <= 42;
const bool binaryGreaterEqual = 42 >= 42;
const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
const int bigNumber = 0x8000000000000000;
main() {}
@@ -0,0 +1,132 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:14:23: Error: '+' is not a prefix operator.
// Try removing '+'.
// const int unaryPlus = +2;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
// const int divZero = 2 / 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:7:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:7:30: Context: Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:7:11: Context: While analyzing:
// const int shiftNegative1 = 2 << -1;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:8:30: Error: Constant evaluation error:
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:8:30: Context: Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:8:11: Context: While analyzing:
// const int shiftNegative3 = 2 >> -1;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:9:23: Error: Constant evaluation error:
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:9:23: Context: Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:9:11: Context: While analyzing:
// const int modZero = 2 % 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:11:26: Error: Constant evaluation error:
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:11:26: Context: Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:11:11: Context: While analyzing:
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:35:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:35:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:35:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:36:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:36:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:36:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:38:39: Error: Constant evaluation error:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:38:39: Context: Binary operator '84.2 ~/ NaN' results is Infinity or NaN.
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:38:11: Context: While analyzing:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:14:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C3;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift4 = #C3;
static const field core::int* binaryShift5 = #C4;
static const field core::bool* binaryLess = #C5;
static const field core::bool* binaryLessEqual = #C6;
static const field core::bool* binaryGreaterEqual = #C6;
static const field core::bool* binaryGreater = #C5;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C7;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int* bigNumber = #C8;
static method main() → dynamic {}
constants {
#C1 = -2.0
#C2 = 4294967293.0
#C3 = 42.0
#C4 = 4294967295.0
#C5 = false
#C6 = true
#C7 = NaN
#C8 = 9223372036854776000.0
}
@@ -0,0 +1,80 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:14:23: Error: '+' is not a prefix operator.
// Try removing '+'.
// const int unaryPlus = +2;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
// const int divZero = 2 / 0;
// ^
//
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = 2.{core::int::<<}(1.{core::int::unary-}(){() →* core::int*}){(core::int*) →* core::int*};
static const field core::int* shiftNegative3 = 2.{core::int::>>}(1.{core::int::unary-}(){() →* core::int*}){(core::int*) →* core::int*};
static const field core::int* modZero = 2.{core::num::%}(0){(core::num*) →* core::int*};
static const field core::int* divZero = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^" in 2.{core::num::/}(0){(core::num*) →* core::double*} as{TypeError} core::int*;
static const field core::int* intdivZero = 2.{core::num::~/}(0){(core::num*) →* core::int*};
static const field core::int* unaryMinus = 2.{core::int::unary-}(){() →* core::int*};
static const field core::int* unaryTilde = 2.{core::int::~}(){() →* core::int*};
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:14:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^"{dynamic}.+(2) as{TypeError,ForDynamic} core::int*;
static const field core::int* binaryPlus = 40.{core::num::+}(2){(core::num*) →* core::int*};
static const field core::int* binaryMinus = 44.{core::num::-}(2){(core::num*) →* core::int*};
static const field core::int* binaryTimes = 21.{core::num::*}(2){(core::num*) →* core::int*};
static const field core::double* binaryDiv = 84.{core::num::/}(2){(core::num*) →* core::double*};
static const field core::int* binaryTildeDiv = 84.{core::num::~/}(2){(core::num*) →* core::int*};
static const field core::int* binaryMod = 85.{core::num::%}(43){(core::num*) →* core::int*};
static const field core::int* binaryOr = 32.{core::int::|}(10){(core::int*) →* core::int*};
static const field core::int* binaryAnd = 63.{core::int::&}(106){(core::int*) →* core::int*};
static const field core::int* binaryXor = 63.{core::int::^}(21){(core::int*) →* core::int*};
static const field core::int* binaryShift1 = 21.{core::int::<<}(1){(core::int*) →* core::int*};
static const field core::int* binaryShift4 = 84.{core::int::>>}(1){(core::int*) →* core::int*};
static const field core::int* binaryShift5 = 1.{core::int::unary-}(){() →* core::int*}.{core::int::>>}(1){(core::int*) →* core::int*};
static const field core::bool* binaryLess = 42.{core::num::<}(42){(core::num*) →* core::bool*};
static const field core::bool* binaryLessEqual = 42.{core::num::<=}(42){(core::num*) →* core::bool*};
static const field core::bool* binaryGreaterEqual = 42.{core::num::>=}(42){(core::num*) →* core::bool*};
static const field core::bool* binaryGreater = 42.{core::num::>}(42){(core::num*) →* core::bool*};
static const field core::int* doubleTruncateDiv = 84.2.{core::double::~/}(2){(core::num*) →* core::int*};
static const field core::int* doubleTruncateDivZero = 84.2.{core::double::~/}(0){(core::num*) →* core::int*};
static const field core::int* doubleTruncateDivNull = 84.2.{core::double::~/}(null){(core::num*) →* core::int*};
static const field core::double* doubleNan = 0.{core::num::/}(0){(core::num*) →* core::double*};
static const field core::int* doubleTruncateDivNaN = 84.2.{core::double::~/}(self::doubleNan){(core::num*) →* core::int*};
static const field core::int* bigNumber = -9223372036854775808;
static method main() → dynamic
;
Extra constant evaluation status:
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:7:33 -> DoubleConstant(-1.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:8:33 -> DoubleConstant(-1.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:10:23 -> DoubleConstant(Infinity)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:12:24 -> DoubleConstant(-2.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:13:24 -> DoubleConstant(4294967293.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:16:27 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:17:28 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:18:28 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:19:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:20:30 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:21:26 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:22:25 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:23:26 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:24:26 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:25:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:27:29 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:28:29 -> DoubleConstant(4294967295.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:29:28 -> BoolConstant(false)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:30:33 -> BoolConstant(true)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:31:36 -> BoolConstant(true)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:32:31 -> BoolConstant(false)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:34:36 -> DoubleConstant(42.0)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:37:27 -> DoubleConstant(NaN)
Evaluated: StaticGet @ org-dartlang-testcase:///number_folds_opt_out.dart:38:42 -> DoubleConstant(NaN)
Extra constant evaluation: evaluated: 35, effectively constant: 24
@@ -0,0 +1,132 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:14:23: Error: '+' is not a prefix operator.
// Try removing '+'.
// const int unaryPlus = +2;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
// const int divZero = 2 / 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:7:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:7:30: Context: Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:7:11: Context: While analyzing:
// const int shiftNegative1 = 2 << -1;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:8:30: Error: Constant evaluation error:
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:8:30: Context: Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:8:11: Context: While analyzing:
// const int shiftNegative3 = 2 >> -1;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:9:23: Error: Constant evaluation error:
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:9:23: Context: Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:9:11: Context: While analyzing:
// const int modZero = 2 % 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:11:26: Error: Constant evaluation error:
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:11:26: Context: Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:11:11: Context: While analyzing:
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:35:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:35:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:35:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:36:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:36:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:36:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:38:39: Error: Constant evaluation error:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:38:39: Context: Binary operator '84.2 ~/ NaN' results is Infinity or NaN.
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:38:11: Context: While analyzing:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds_opt_out.dart:14:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C3;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift4 = #C3;
static const field core::int* binaryShift5 = #C4;
static const field core::bool* binaryLess = #C5;
static const field core::bool* binaryLessEqual = #C6;
static const field core::bool* binaryGreaterEqual = #C6;
static const field core::bool* binaryGreater = #C5;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C7;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int* bigNumber = #C8;
static method main() → dynamic {}
constants {
#C1 = -2.0
#C2 = 4294967293.0
#C3 = 42.0
#C4 = 4294967295.0
#C5 = false
#C6 = true
#C7 = NaN
#C8 = 9223372036854776000.0
}
@@ -1,7 +1,7 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative2 = 2 >>> -1;
const int shiftNegative3 = 2 >> -1;
@@ -23,7 +23,6 @@ const int binaryAnd = 63 & 106;
const int binaryXor = 63 ^ 21;
const int binaryShift1 = 21 << 1;
// These aren't currently defined on int :(.
const int binaryShift2 = 84 >>> 1;
const int binaryShift3 = 21 >>> 64;
@@ -35,7 +34,8 @@ const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const dynamic nil = null;
const int doubleTruncateDivNull = 84.2 ~/ nil;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
@@ -1,4 +1,3 @@
// @dart = 2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative2 = 2 >>> -1;
const int shiftNegative3 = 2 >> -1;
@@ -27,7 +26,8 @@ const bool binaryGreaterEqual = 42 >= 42;
const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const dynamic nil = null;
const int doubleTruncateDivNull = 84.2 ~/ nil;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
main() {}
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -61,24 +61,24 @@ library;
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:37:40: Error: Constant evaluation error:
// pkg/front_end/testcases/general/constants/number_folds.dart:36:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:37:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// pkg/front_end/testcases/general/constants/number_folds.dart:36:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:37:11: Context: While analyzing:
// pkg/front_end/testcases/general/constants/number_folds.dart:36:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:38:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:38:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:38:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:40:39: Error: Constant evaluation error:
@@ -94,41 +94,42 @@ library;
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* shiftNegative2 = invalid-expression "Binary operator '>>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
static const field core::int shiftNegative1 = invalid-expression "Binary operator '<<' on '2' requires non-negative operand, but was '-1'.";
static const field core::int shiftNegative2 = invalid-expression "Binary operator '>>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int shiftNegative3 = invalid-expression "Binary operator '>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int modZero = invalid-expression "Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int divZero = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: This couldn't be parsed.
static const field core::int intdivZero = invalid-expression "Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int unaryMinus = #C1;
static const field core::int unaryTilde = #C2;
static const field core::int unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C4;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift2 = #C3;
static const field core::int* binaryShift3 = #C5;
static const field core::int* binaryShift4 = #C3;
static const field core::bool* binaryLess = #C6;
static const field core::bool* binaryLessEqual = #C7;
static const field core::bool* binaryGreaterEqual = #C7;
static const field core::bool* binaryGreater = #C6;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C8;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int binaryPlus = #C3;
static const field core::int binaryMinus = #C3;
static const field core::int binaryTimes = #C3;
static const field core::double binaryDiv = #C4;
static const field core::int binaryTildeDiv = #C3;
static const field core::int binaryMod = #C3;
static const field core::int binaryOr = #C3;
static const field core::int binaryAnd = #C3;
static const field core::int binaryXor = #C3;
static const field core::int binaryShift1 = #C3;
static const field core::int binaryShift2 = #C3;
static const field core::int binaryShift3 = #C5;
static const field core::int binaryShift4 = #C3;
static const field core::bool binaryLess = #C6;
static const field core::bool binaryLessEqual = #C7;
static const field core::bool binaryGreaterEqual = #C7;
static const field core::bool binaryGreater = #C6;
static const field core::int doubleTruncateDiv = #C3;
static const field core::int doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field dynamic nil = #C8;
static const field core::int doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double doubleNan = #C9;
static const field core::int doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static method main() → dynamic {}
constants {
@@ -139,5 +140,6 @@ constants {
#C5 = 0
#C6 = false
#C7 = true
#C8 = NaN
#C8 = null
#C9 = NaN
}
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -14,41 +14,42 @@ library;
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = 2.{core::int::<<}(1.{core::int::unary-}());
static const field core::int* shiftNegative2 = 2.{core::int::>>>}(1.{core::int::unary-}());
static const field core::int* shiftNegative3 = 2.{core::int::>>}(1.{core::int::unary-}());
static const field core::int* modZero = 2.{core::num::%}(0);
static const field core::int* divZero = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
static const field core::int shiftNegative1 = 2.{core::int::<<}(1.{core::int::unary-}());
static const field core::int shiftNegative2 = 2.{core::int::>>>}(1.{core::int::unary-}());
static const field core::int shiftNegative3 = 2.{core::int::>>}(1.{core::int::unary-}());
static const field core::int modZero = 2.{core::num::%}(0);
static const field core::int divZero = let final Never #t1 = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^" in 2.{core::num::/}(0) as{TypeError} core::int*;
static const field core::int* intdivZero = 2.{core::num::~/}(0);
static const field core::int* unaryMinus = 2.{core::int::unary-}();
static const field core::int* unaryTilde = 2.{core::int::~}();
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: This couldn't be parsed.
^" in 2.{core::num::/}(0) as{TypeError,ForNonNullableByDefault} core::int;
static const field core::int intdivZero = 2.{core::num::~/}(0);
static const field core::int unaryMinus = 2.{core::int::unary-}();
static const field core::int unaryTilde = 2.{core::int::~}();
static const field core::int unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^".+(2) as{TypeError,ForDynamic} core::int*;
static const field core::int* binaryPlus = 40.{core::num::+}(2);
static const field core::int* binaryMinus = 44.{core::num::-}(2);
static const field core::int* binaryTimes = 21.{core::num::*}(2);
static const field core::double* binaryDiv = 84.{core::num::/}(2);
static const field core::int* binaryTildeDiv = 84.{core::num::~/}(2);
static const field core::int* binaryMod = 85.{core::num::%}(43);
static const field core::int* binaryOr = 32.{core::int::|}(10);
static const field core::int* binaryAnd = 63.{core::int::&}(106);
static const field core::int* binaryXor = 63.{core::int::^}(21);
static const field core::int* binaryShift1 = 21.{core::int::<<}(1);
static const field core::int* binaryShift2 = 84.{core::int::>>>}(1);
static const field core::int* binaryShift3 = 21.{core::int::>>>}(64);
static const field core::int* binaryShift4 = 84.{core::int::>>}(1);
static const field core::bool* binaryLess = 42.{core::num::<}(42);
static const field core::bool* binaryLessEqual = 42.{core::num::<=}(42);
static const field core::bool* binaryGreaterEqual = 42.{core::num::>=}(42);
static const field core::bool* binaryGreater = 42.{core::num::>}(42);
static const field core::int* doubleTruncateDiv = 84.2.{core::double::~/}(2);
static const field core::int* doubleTruncateDivZero = 84.2.{core::double::~/}(0);
static const field core::int* doubleTruncateDivNull = 84.2.{core::double::~/}(null);
static const field core::double* doubleNan = 0.{core::num::/}(0);
static const field core::int* doubleTruncateDivNaN = 84.2.{core::double::~/}(self::doubleNan);
^".+(2) as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
static const field core::int binaryPlus = 40.{core::num::+}(2);
static const field core::int binaryMinus = 44.{core::num::-}(2);
static const field core::int binaryTimes = 21.{core::num::*}(2);
static const field core::double binaryDiv = 84.{core::num::/}(2);
static const field core::int binaryTildeDiv = 84.{core::num::~/}(2);
static const field core::int binaryMod = 85.{core::num::%}(43);
static const field core::int binaryOr = 32.{core::int::|}(10);
static const field core::int binaryAnd = 63.{core::int::&}(106);
static const field core::int binaryXor = 63.{core::int::^}(21);
static const field core::int binaryShift1 = 21.{core::int::<<}(1);
static const field core::int binaryShift2 = 84.{core::int::>>>}(1);
static const field core::int binaryShift3 = 21.{core::int::>>>}(64);
static const field core::int binaryShift4 = 84.{core::int::>>}(1);
static const field core::bool binaryLess = 42.{core::num::<}(42);
static const field core::bool binaryLessEqual = 42.{core::num::<=}(42);
static const field core::bool binaryGreaterEqual = 42.{core::num::>=}(42);
static const field core::bool binaryGreater = 42.{core::num::>}(42);
static const field core::int doubleTruncateDiv = 84.2.{core::double::~/}(2);
static const field core::int doubleTruncateDivZero = 84.2.{core::double::~/}(0);
static const field dynamic nil = null;
static const field core::int doubleTruncateDivNull = 84.2.{core::double::~/}(self::nil as{TypeError,ForDynamic,ForNonNullableByDefault} core::num);
static const field core::double doubleNan = 0.{core::num::/}(0);
static const field core::int doubleTruncateDivNaN = 84.2.{core::double::~/}(self::doubleNan);
static method main() → dynamic
;
@@ -70,14 +71,15 @@ Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:21:25 -
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:22:26 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:23:26 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:24:29 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:27:29 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:28:29 -> IntConstant(0)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:30:29 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:31:28 -> BoolConstant(false)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:32:33 -> BoolConstant(true)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:33:36 -> BoolConstant(true)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:34:31 -> BoolConstant(false)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:36:36 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:26:29 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:27:29 -> IntConstant(0)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:29:29 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:30:28 -> BoolConstant(false)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:31:33 -> BoolConstant(true)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:32:36 -> BoolConstant(true)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:33:31 -> BoolConstant(false)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:35:36 -> IntConstant(42)
Evaluated: AsExpression @ org-dartlang-testcase:///number_folds.dart:38:43 -> NullConstant(null)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds.dart:39:27 -> DoubleConstant(NaN)
Evaluated: StaticGet @ org-dartlang-testcase:///number_folds.dart:40:42 -> DoubleConstant(NaN)
Extra constant evaluation: evaluated: 38, effectively constant: 26
Extra constant evaluation: evaluated: 39, effectively constant: 27
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -61,24 +61,24 @@ library;
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:37:40: Error: Constant evaluation error:
// pkg/front_end/testcases/general/constants/number_folds.dart:36:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:37:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// pkg/front_end/testcases/general/constants/number_folds.dart:36:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:37:11: Context: While analyzing:
// pkg/front_end/testcases/general/constants/number_folds.dart:36:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:38:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:38:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/number_folds.dart:38:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:40:39: Error: Constant evaluation error:
@@ -94,41 +94,42 @@ library;
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* shiftNegative2 = invalid-expression "Binary operator '>>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
static const field core::int shiftNegative1 = invalid-expression "Binary operator '<<' on '2' requires non-negative operand, but was '-1'.";
static const field core::int shiftNegative2 = invalid-expression "Binary operator '>>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int shiftNegative3 = invalid-expression "Binary operator '>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int modZero = invalid-expression "Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int divZero = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: This couldn't be parsed.
static const field core::int intdivZero = invalid-expression "Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int unaryMinus = #C1;
static const field core::int unaryTilde = #C2;
static const field core::int unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C4;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift2 = #C3;
static const field core::int* binaryShift3 = #C5;
static const field core::int* binaryShift4 = #C3;
static const field core::bool* binaryLess = #C6;
static const field core::bool* binaryLessEqual = #C7;
static const field core::bool* binaryGreaterEqual = #C7;
static const field core::bool* binaryGreater = #C6;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C8;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int binaryPlus = #C3;
static const field core::int binaryMinus = #C3;
static const field core::int binaryTimes = #C3;
static const field core::double binaryDiv = #C4;
static const field core::int binaryTildeDiv = #C3;
static const field core::int binaryMod = #C3;
static const field core::int binaryOr = #C3;
static const field core::int binaryAnd = #C3;
static const field core::int binaryXor = #C3;
static const field core::int binaryShift1 = #C3;
static const field core::int binaryShift2 = #C3;
static const field core::int binaryShift3 = #C5;
static const field core::int binaryShift4 = #C3;
static const field core::bool binaryLess = #C6;
static const field core::bool binaryLessEqual = #C7;
static const field core::bool binaryGreaterEqual = #C7;
static const field core::bool binaryGreater = #C6;
static const field core::int doubleTruncateDiv = #C3;
static const field core::int doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field dynamic nil = #C8;
static const field core::int doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double doubleNan = #C9;
static const field core::int doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static method main() → dynamic {}
constants {
@@ -139,5 +140,6 @@ constants {
#C5 = 0
#C6 = false
#C7 = true
#C8 = NaN
#C8 = null
#C9 = NaN
}
@@ -0,0 +1,41 @@
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative3 = 2 >> -1;
const int modZero = 2 % 0;
const int divZero = 2 / 0;
const int intdivZero = 2 ~/ 0;
const int unaryMinus = -2;
const int unaryTilde = ~2;
const int unaryPlus = +2;
const int binaryPlus = 40 + 2;
const int binaryMinus = 44 - 2;
const int binaryTimes = 21 * 2;
const double binaryDiv = 84 / 2;
const int binaryTildeDiv = 84~/ 2;
const int binaryMod = 85 % 43;
const int binaryOr = 32 | 10;
const int binaryAnd = 63 & 106;
const int binaryXor = 63 ^ 21;
const int binaryShift1 = 21 << 1;
const int binaryShift4 = 84 >> 1;
const bool binaryLess = 42 < 42;
const bool binaryLessEqual = 42 <= 42;
const bool binaryGreaterEqual = 42 >= 42;
const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
main() {
}
@@ -0,0 +1,30 @@
// @dart = 2.9
const int shiftNegative1 = 2 << -1;
const int shiftNegative3 = 2 >> -1;
const int modZero = 2 % 0;
const int divZero = 2 / 0;
const int intdivZero = 2 ~/ 0;
const int unaryMinus = -2;
const int unaryTilde = ~2;
const int unaryPlus = +2;
const int binaryPlus = 40 + 2;
const int binaryMinus = 44 - 2;
const int binaryTimes = 21 * 2;
const double binaryDiv = 84 / 2;
const int binaryTildeDiv = 84~/ 2;
const int binaryMod = 85 % 43;
const int binaryOr = 32 | 10;
const int binaryAnd = 63 & 106;
const int binaryXor = 63 ^ 21;
const int binaryShift1 = 21 << 1;
const int binaryShift4 = 84 >> 1;
const bool binaryLess = 42 < 42;
const bool binaryLessEqual = 42 <= 42;
const bool binaryGreaterEqual = 42 >= 42;
const bool binaryGreater = 42 > 42;
const int doubleTruncateDiv = 84.2 ~/ 2;
const int doubleTruncateDivZero = 84.2 ~/ 0;
const int doubleTruncateDivNull = 84.2 ~/ null;
const double doubleNan = 0/0;
const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
main() {}
@@ -0,0 +1,129 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:14:23: Error: '+' is not a prefix operator.
// Try removing '+'.
// const int unaryPlus = +2;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
// const int divZero = 2 / 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:7:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:7:30: Context: Binary operator '<<' on '2' requires non-negative operand, but was '-1'.
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:7:11: Context: While analyzing:
// const int shiftNegative1 = 2 << -1;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:8:30: Error: Constant evaluation error:
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:8:30: Context: Binary operator '>>' on '2' requires non-negative operand, but was '-1'.
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:8:11: Context: While analyzing:
// const int shiftNegative3 = 2 >> -1;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:9:23: Error: Constant evaluation error:
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:9:23: Context: Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:9:11: Context: While analyzing:
// const int modZero = 2 % 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:11:26: Error: Constant evaluation error:
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:11:26: Context: Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:11:11: Context: While analyzing:
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:34:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:34:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:34:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:35:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:35:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:35:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:37:39: Error: Constant evaluation error:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:37:39: Context: Binary operator '84.2 ~/ NaN' results is Infinity or NaN.
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:37:11: Context: While analyzing:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:14:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C4;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift4 = #C3;
static const field core::bool* binaryLess = #C5;
static const field core::bool* binaryLessEqual = #C6;
static const field core::bool* binaryGreaterEqual = #C6;
static const field core::bool* binaryGreater = #C5;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C7;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static method main() → dynamic {}
constants {
#C1 = -2
#C2 = -3
#C3 = 42
#C4 = 42.0
#C5 = false
#C6 = true
#C7 = NaN
}
@@ -0,0 +1,77 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:14:23: Error: '+' is not a prefix operator.
// Try removing '+'.
// const int unaryPlus = +2;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
// const int divZero = 2 / 0;
// ^
//
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = 2.{core::int::<<}(1.{core::int::unary-}());
static const field core::int* shiftNegative3 = 2.{core::int::>>}(1.{core::int::unary-}());
static const field core::int* modZero = 2.{core::num::%}(0);
static const field core::int* divZero = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^" in 2.{core::num::/}(0) as{TypeError} core::int*;
static const field core::int* intdivZero = 2.{core::num::~/}(0);
static const field core::int* unaryMinus = 2.{core::int::unary-}();
static const field core::int* unaryTilde = 2.{core::int::~}();
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:14:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^".+(2) as{TypeError,ForDynamic} core::int*;
static const field core::int* binaryPlus = 40.{core::num::+}(2);
static const field core::int* binaryMinus = 44.{core::num::-}(2);
static const field core::int* binaryTimes = 21.{core::num::*}(2);
static const field core::double* binaryDiv = 84.{core::num::/}(2);
static const field core::int* binaryTildeDiv = 84.{core::num::~/}(2);
static const field core::int* binaryMod = 85.{core::num::%}(43);
static const field core::int* binaryOr = 32.{core::int::|}(10);
static const field core::int* binaryAnd = 63.{core::int::&}(106);
static const field core::int* binaryXor = 63.{core::int::^}(21);
static const field core::int* binaryShift1 = 21.{core::int::<<}(1);
static const field core::int* binaryShift4 = 84.{core::int::>>}(1);
static const field core::bool* binaryLess = 42.{core::num::<}(42);
static const field core::bool* binaryLessEqual = 42.{core::num::<=}(42);
static const field core::bool* binaryGreaterEqual = 42.{core::num::>=}(42);
static const field core::bool* binaryGreater = 42.{core::num::>}(42);
static const field core::int* doubleTruncateDiv = 84.2.{core::double::~/}(2);
static const field core::int* doubleTruncateDivZero = 84.2.{core::double::~/}(0);
static const field core::int* doubleTruncateDivNull = 84.2.{core::double::~/}(null);
static const field core::double* doubleNan = 0.{core::num::/}(0);
static const field core::int* doubleTruncateDivNaN = 84.2.{core::double::~/}(self::doubleNan);
static method main() → dynamic
;
Extra constant evaluation status:
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:7:33 -> IntConstant(-1)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:8:33 -> IntConstant(-1)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:10:23 -> DoubleConstant(Infinity)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:12:24 -> IntConstant(-2)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:13:24 -> IntConstant(-3)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:16:27 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:17:28 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:18:28 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:19:29 -> DoubleConstant(42.0)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:20:30 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:21:26 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:22:25 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:23:26 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:24:26 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:25:29 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:27:29 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:28:28 -> BoolConstant(false)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:29:33 -> BoolConstant(true)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:30:36 -> BoolConstant(true)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:31:31 -> BoolConstant(false)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:33:36 -> IntConstant(42)
Evaluated: MethodInvocation @ org-dartlang-testcase:///number_folds_opt_out.dart:36:27 -> DoubleConstant(NaN)
Evaluated: StaticGet @ org-dartlang-testcase:///number_folds_opt_out.dart:37:42 -> DoubleConstant(NaN)
Extra constant evaluation: evaluated: 34, effectively constant: 23
@@ -0,0 +1,129 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:14:23: Error: '+' is not a prefix operator.
// Try removing '+'.
// const int unaryPlus = +2;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
// const int divZero = 2 / 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:7:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:7:30: Context: Binary operator '<<' on '2' requires non-negative operand, but was '-1'.
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:7:11: Context: While analyzing:
// const int shiftNegative1 = 2 << -1;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:8:30: Error: Constant evaluation error:
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:8:30: Context: Binary operator '>>' on '2' requires non-negative operand, but was '-1'.
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:8:11: Context: While analyzing:
// const int shiftNegative3 = 2 >> -1;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:9:23: Error: Constant evaluation error:
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:9:23: Context: Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:9:11: Context: While analyzing:
// const int modZero = 2 % 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:11:26: Error: Constant evaluation error:
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:11:26: Context: Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:11:11: Context: While analyzing:
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:34:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:34:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:34:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:35:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:35:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:35:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ null;
// ^
//
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:37:39: Error: Constant evaluation error:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:37:39: Context: Binary operator '84.2 ~/ NaN' results is Infinity or NaN.
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:37:11: Context: While analyzing:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
import self as self;
import "dart:core" as core;
static const field core::int* shiftNegative1 = invalid-expression "Binary operator '<<' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* shiftNegative3 = invalid-expression "Binary operator '>>' on '2' requires non-negative operand, but was '-1'.";
static const field core::int* modZero = invalid-expression "Binary operator '%' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* divZero = invalid-expression "pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:10:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int* intdivZero = invalid-expression "Binary operator '~/' on '2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* unaryMinus = #C1;
static const field core::int* unaryTilde = #C2;
static const field core::int* unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/number_folds_opt_out.dart:14:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int* binaryPlus = #C3;
static const field core::int* binaryMinus = #C3;
static const field core::int* binaryTimes = #C3;
static const field core::double* binaryDiv = #C4;
static const field core::int* binaryTildeDiv = #C3;
static const field core::int* binaryMod = #C3;
static const field core::int* binaryOr = #C3;
static const field core::int* binaryAnd = #C3;
static const field core::int* binaryXor = #C3;
static const field core::int* binaryShift1 = #C3;
static const field core::int* binaryShift4 = #C3;
static const field core::bool* binaryLess = #C5;
static const field core::bool* binaryLessEqual = #C6;
static const field core::bool* binaryGreaterEqual = #C6;
static const field core::bool* binaryGreater = #C5;
static const field core::int* doubleTruncateDiv = #C3;
static const field core::int* doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field core::int* doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double* doubleNan = #C7;
static const field core::int* doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static method main() → dynamic {}
constants {
#C1 = -2
#C2 = -3
#C3 = 42
#C4 = 42.0
#C5 = false
#C6 = true
#C7 = NaN
}
@@ -1,7 +1,9 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import 'nsm_covariance_lib.dart';
abstract class D1 implements A<int>, B {}
@@ -219,44 +219,44 @@ class C4 extends core::Object implements nsm::B, nsm::A<core::int*> {
Extra constant evaluation status:
Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance.dart:12:4 -> InstanceConstant(const _Override{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#_method1)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#_method2)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#b)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#c)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#d)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#_method3)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#_method4)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:11:7 -> SymbolConstant(#b)
Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance.dart:17:4 -> InstanceConstant(const _Override{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#_method1)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#_method2)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#b)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#c)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#d)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#_method3)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#_method4)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:16:7 -> SymbolConstant(#b)
Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance.dart:14:4 -> InstanceConstant(const _Override{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method1)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method2)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#b)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#c)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#d)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method3)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method4)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#b)
Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance.dart:19:4 -> InstanceConstant(const _Override{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method1)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method2)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#b)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#c)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#d)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method3)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method4)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <dynamic>[])
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#a)
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#b)
Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance_lib.dart:24:4 -> InstanceConstant(const _Override{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> SymbolConstant(#_method1)
Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> ListConstant(const <Type*>[])
@@ -0,0 +1,34 @@
# Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE.md file.
# Compile a library with an explicit language version that prohibits use of
# null safety syntax. Remove the explicit language version annotation in
# the update to check the version isn't copied over from the original
# library.
type: newworld
worlds:
- entry: main.dart
experiments: non-nullable
errors: true
warnings: false
sources:
main.dart: |
// @dart=2.9
main() {
int? i;
}
expectedLibraryCount: 1
- entry: main.dart
experiments: non-nullable
invalidate:
- main.dart
errors: false
warnings: false
sources:
main.dart: |
main() {
int? i;
}
expectedLibraryCount: 1
@@ -0,0 +1,18 @@
main = main::main;
library from "org-dartlang-test:///main.dart" as main {
//
// Problems in library:
//
// org-dartlang-test:///main.dart:3:6: Error: Null safety features are disabled for this library.
// Try removing the `@dart=` annotation or setting the language version to 2.10 or higher.
// int? i;
// ^
// org-dartlang-test:///main.dart:1:1: Context: This is the annotation that opts out this library from null safety features.
// // @dart=2.9
// ^^^^^^^^^^^^
//
static method main() → dynamic {
dart.core::int? i;
}
}
@@ -0,0 +1,7 @@
main = main::main;
library from "org-dartlang-test:///main.dart" as main {
static method main() → dynamic {
dart.core::int? i;
}
}
@@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.5
// @dart=2.9
class LegacyClass1 {}
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.5
// @dart=2.9
class LegacyClass3 {}
@@ -2,16 +2,14 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.5
// @dart=2.9
export 'export_from_opt_out_lib5.dart';
class LegacyClass2 {
}
class LegacyClass2 {}
legacyMethod1() {}
extension LegacyExtension on String {
}
extension LegacyExtension on String {}
typedef LegacyTypedef = void Function();
typedef LegacyTypedef = void Function();
@@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.5
// @dart=2.9
export 'export_from_opt_out_lib5.dart';
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
// FutureOr<AAlias> foLegacyNonNullable = null; // error
// ^
@@ -21,11 +21,11 @@ import "org-dartlang-testcase:///issue41501_lib.dart";
typedef AAliasNonNullable = opt::A;
typedef AAliasNullable = opt::A?;
static method test() → dynamic {
FutureOr<opt::A>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
FutureOr<() → opt::A*>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAlias> foLegacyNonNullable = null; // error
^" in null as{TypeError,ForNonNullableByDefault} FutureOr<opt::A>;
FutureOr<opt::A?>foLegacyNullable = null;
^" in null as{TypeError,ForNonNullableByDefault} FutureOr<() → opt::A*>;
FutureOr<() →? opt::A*>foLegacyNullable = null;
FutureOr<opt::A>foNonNullable = let final Never #t2 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:15:47: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAliasNonNullable> foNonNullable = null; // error
@@ -50,7 +50,7 @@ import "dart:core" as core;
import "dart:async";
import "org-dartlang-testcase:///issue41501.dart";
typedef AAlias = opt::A*;
typedef AAlias = () →* opt::A*;
class A extends core::Object {
synthetic constructor •() → opt::A*
: super core::Object::•()
@@ -67,7 +67,7 @@ class A extends core::Object {
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method test() → dynamic {
FutureOr<opt::A*>* foLegacy = null;
FutureOr<() →* opt::A*>* foLegacy = null;
FutureOr<opt::A*>* foNonNullable = null;
FutureOr<opt::A*>* foNullable = null;
}
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
// FutureOr<AAlias> foLegacyNonNullable = null; // error
// ^
@@ -21,11 +21,11 @@ import "org-dartlang-testcase:///issue41501_lib.dart";
typedef AAliasNonNullable = opt::A;
typedef AAliasNullable = opt::A?;
static method test() → dynamic {
FutureOr<opt::A>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
FutureOr<() → opt::A*>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAlias> foLegacyNonNullable = null; // error
^" in let Null #t2 = null in #t2.==(null) ?{FutureOr<opt::A>} #t2 as{TypeError,ForNonNullableByDefault} FutureOr<opt::A> : #t2{FutureOr<opt::A>};
FutureOr<opt::A?>foLegacyNullable = null;
^" in let Null #t2 = null in #t2.==(null) ?{FutureOr<() → opt::A*>} #t2 as{TypeError,ForNonNullableByDefault} FutureOr<() → opt::A*> : #t2{FutureOr<() → opt::A*>};
FutureOr<() →? opt::A*>foLegacyNullable = null;
FutureOr<opt::A>foNonNullable = let final Never #t3 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:15:47: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAliasNonNullable> foNonNullable = null; // error
@@ -50,7 +50,7 @@ import "dart:core" as core;
import "dart:async";
import "org-dartlang-testcase:///issue41501.dart";
typedef AAlias = opt::A*;
typedef AAlias = () →* opt::A*;
class A extends core::Object {
synthetic constructor •() → opt::A*
: super core::Object::•()
@@ -67,7 +67,7 @@ class A extends core::Object {
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method test() → dynamic {
FutureOr<opt::A*>* foLegacy = null;
FutureOr<() →* opt::A*>* foLegacy = null;
FutureOr<opt::A*>* foNonNullable = null;
FutureOr<opt::A*>* foNullable = null;
}
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
// FutureOr<AAlias> foLegacyNonNullable = null; // error
// ^
@@ -21,11 +21,11 @@ import "org-dartlang-testcase:///issue41501_lib.dart";
typedef AAliasNonNullable = opt::A;
typedef AAliasNullable = opt::A?;
static method test() → dynamic {
FutureOr<opt::A>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
FutureOr<() → opt::A*>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAlias> foLegacyNonNullable = null; // error
^" in null as{TypeError,ForNonNullableByDefault} FutureOr<opt::A>;
FutureOr<opt::A?>foLegacyNullable = null;
^" in null as{TypeError,ForNonNullableByDefault} FutureOr<() → opt::A*>;
FutureOr<() →? opt::A*>foLegacyNullable = null;
FutureOr<opt::A>foNonNullable = let final Never #t2 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:15:47: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAliasNonNullable> foNonNullable = null; // error
@@ -43,7 +43,7 @@ import "dart:core" as core;
import "dart:async";
import "org-dartlang-testcase:///issue41501.dart";
typedef AAlias = opt::A*;
typedef AAlias = () →* opt::A*;
class A extends core::Object {
synthetic constructor •() → opt::A*
: super core::Object::•()
@@ -60,7 +60,7 @@ class A extends core::Object {
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method test() → dynamic {
FutureOr<opt::A*>* foLegacy = null;
FutureOr<() →* opt::A*>* foLegacy = null;
FutureOr<opt::A*>* foNonNullable = null;
FutureOr<opt::A*>* foNullable = null;
}
@@ -19,7 +19,7 @@ import "dart:core" as core;
import "dart:async";
import "org-dartlang-testcase:///issue41501.dart";
typedef AAlias = opt::A*;
typedef AAlias = () →* opt::A*;
class A extends core::Object {
synthetic constructor •() → opt::A*
;
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
// pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
// - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
// FutureOr<AAlias> foLegacyNonNullable = null; // error
// ^
@@ -21,11 +21,11 @@ import "org-dartlang-testcase:///issue41501_lib.dart";
typedef AAliasNonNullable = opt::A;
typedef AAliasNullable = opt::A?;
static method test() → dynamic {
FutureOr<opt::A>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
FutureOr<() → opt::A*>foLegacyNonNullable = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:13:42: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A Function()>' because 'FutureOr<A Function()>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAlias> foLegacyNonNullable = null; // error
^" in null;
FutureOr<opt::A?>foLegacyNullable = null;
FutureOr<() →? opt::A*>foLegacyNullable = null;
FutureOr<opt::A>foNonNullable = let final Never #t2 = invalid-expression "pkg/front_end/testcases/nonfunction_type_aliases/issue41501.dart:15:47: Error: The value 'null' can't be assigned to a variable of type 'FutureOr<A>' because 'FutureOr<A>' is not nullable.
- 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue41501_lib.dart'.
FutureOr<AAliasNonNullable> foNonNullable = null; // error
@@ -43,7 +43,7 @@ import "dart:core" as core;
import "dart:async";
import "org-dartlang-testcase:///issue41501.dart";
typedef AAlias = opt::A*;
typedef AAlias = () →* opt::A*;
class A extends core::Object {
synthetic constructor •() → opt::A*
: super core::Object::•()
@@ -60,7 +60,7 @@ class A extends core::Object {
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method test() → dynamic {
FutureOr<opt::A*>* foLegacy = null;
FutureOr<() →* opt::A*>* foLegacy = null;
FutureOr<opt::A*>* foNonNullable = null;
FutureOr<opt::A*>* foNullable = null;
}
@@ -11,11 +11,10 @@ import 'issue41501.dart';
class A {}
typedef AAlias = A;
typedef AAlias = A Function();
test() {
FutureOr<AAlias> foLegacy = null; // ok
FutureOr<AAliasNonNullable> foNonNullable = null; // ok
FutureOr<AAliasNullable> foNullable = null; // ok
}
@@ -1,10 +1,12 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
import "issue_43084_lib.dart";
import 'issue_43084_lib.dart';
main() {
Bar<int> x = new Bar<int>();
print(x);
}
}
@@ -0,0 +1,29 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/issue_43084/issue_43084.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// // @dart=2.9
// ^^^^^^^^^^^^
//
import self as self;
import "issue_43084_lib.dart" as iss;
import "dart:core" as core;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic {
iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
core::print(x);
}
library /*isNonNullableByDefault*/;
import self as iss;
import "dart:core" as core;
typedef Bar<X extends core::Object? = dynamic> = iss::Foo<X%>;
class Foo<X extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → iss::Foo<iss::Foo::X%>
: super core::Object::•()
;
}
@@ -0,0 +1,29 @@
library;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/issue_43084/issue_43084.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// // @dart=2.9
// ^^^^^^^^^^^^
//
import self as self;
import "issue_43084_lib.dart" as iss;
import "dart:core" as core;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic {
iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
core::print(x);
}
library /*isNonNullableByDefault*/;
import self as iss;
import "dart:core" as core;
typedef Bar<X extends core::Object? = dynamic> = iss::Foo<X%>;
class Foo<X extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → iss::Foo<iss::Foo::X%>
: super core::Object::•()
;
}
@@ -0,0 +1,4 @@
// @dart = 2.9
import 'issue_43084_lib.dart';
main() {}
@@ -0,0 +1,4 @@
// @dart = 2.9
import 'issue_43084_lib.dart';
main() {}
@@ -0,0 +1,22 @@
library;
import self as self;
import "issue_43084_lib.dart" as iss;
import "dart:core" as core;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic {
iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
core::print(x);
}
library /*isNonNullableByDefault*/;
import self as iss;
import "dart:core" as core;
typedef Bar<X extends core::Object? = dynamic> = iss::Foo<X%>;
class Foo<X extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → iss::Foo<iss::Foo::X%>
: super core::Object::•()
;
}
@@ -0,0 +1,17 @@
library;
import self as self;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic
;
library /*isNonNullableByDefault*/;
import self as self2;
import "dart:core" as core;
typedef Bar<X extends core::Object? = dynamic> = self2::Foo<X%>;
class Foo<X extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self2::Foo<self2::Foo::X%>
;
}
@@ -0,0 +1,22 @@
library;
import self as self;
import "issue_43084_lib.dart" as iss;
import "dart:core" as core;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic {
iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
core::print(x);
}
library /*isNonNullableByDefault*/;
import self as iss;
import "dart:core" as core;
typedef Bar<X extends core::Object? = dynamic> = iss::Foo<X%>;
class Foo<X extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → iss::Foo<iss::Foo::X%>
: super core::Object::•()
;
}
@@ -1,7 +1,7 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
class Foo<X> {
}
@@ -0,0 +1,9 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.12
typedef A = int;
void main() {}
@@ -0,0 +1,12 @@
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/old_version.dart:7:11: Error: Can't create typedef from non-function type.
// typedef A = int;
// ^
//
import self as self;
typedef A = invalid-type;
static method main() → void {}
@@ -0,0 +1,12 @@
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/old_version.dart:7:11: Error: Can't create typedef from non-function type.
// typedef A = int;
// ^
//
import self as self;
typedef A = invalid-type;
static method main() → void {}
@@ -0,0 +1,3 @@
// @dart = 2.12
typedef A = int;
void main() {}
@@ -0,0 +1,12 @@
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/old_version.dart:7:11: Error: Can't create typedef from non-function type.
// typedef A = int;
// ^
//
import self as self;
typedef A = invalid-type;
static method main() → void {}
@@ -0,0 +1,13 @@
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/old_version.dart:7:11: Error: Can't create typedef from non-function type.
// typedef A = int;
// ^
//
import self as self;
typedef A = invalid-type;
static method main() → void
;
@@ -0,0 +1,12 @@
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nonfunction_type_aliases/old_version.dart:7:11: Error: Can't create typedef from non-function type.
// typedef A = int;
// ^
//
import self as self;
typedef A = invalid-type;
static method main() → void {}
@@ -1 +0,0 @@
--enable-experiment=nonfunction-type-aliases
@@ -1,4 +0,0 @@
// @dart = 2.9
import "issue_43084_lib.dart";
main() {}
@@ -1,4 +0,0 @@
// @dart = 2.9
import "issue_43084_lib.dart";
main() {}
@@ -1,32 +0,0 @@
library;
import self as self;
import "issue_43084_lib.dart" as iss;
import "dart:core" as core;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic {
iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
core::print(x);
}
library;
import self as iss;
import "dart:core" as core;
typedef Bar<X extends core::Object* = dynamic> = iss::Foo<X*>*;
class Foo<X extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → iss::Foo<iss::Foo::X*>*
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
@@ -1,27 +0,0 @@
library;
import self as self;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic
;
library;
import self as self2;
import "dart:core" as core;
typedef Bar<X extends core::Object* = dynamic> = self2::Foo<X*>*;
class Foo<X extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self2::Foo<self2::Foo::X*>*
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
@@ -1,32 +0,0 @@
library;
import self as self;
import "issue_43084_lib.dart" as iss;
import "dart:core" as core;
import "org-dartlang-testcase:///issue_43084_lib.dart";
static method main() → dynamic {
iss::Foo<core::int*>* x = new iss::Foo::•<core::int*>();
core::print(x);
}
library;
import self as iss;
import "dart:core" as core;
typedef Bar<X extends core::Object* = dynamic> = iss::Foo<X*>*;
class Foo<X extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → iss::Foo<iss::Foo::X*>*
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
@@ -32,8 +32,10 @@ general/bug31124: FormatterCrash
general/clone_function_type: FormatterCrash
general/constants/js_semantics/issue45376: FormatterCrash
general/constants/js_semantics/number_folds: FormatterCrash
general/constants/js_semantics/number_folds_opt_out: FormatterCrash
general/constants/js_semantics/on_double: FormatterCrash
general/constants/number_folds: FormatterCrash
general/constants/number_folds_opt_out: FormatterCrash
general/constants/various: FormatterCrash
general/constructor_initializer_invalid: FormatterCrash
general/duplicated_declarations: FormatterCrash
@@ -133,6 +135,7 @@ nonfunction_type_aliases/issue41501: FormatterCrash
nonfunction_type_aliases/issue42446: FormatterCrash
nonfunction_type_aliases/issue45051: FormatterCrash
nonfunction_type_aliases/nullable_supertypes: FormatterCrash
nonfunction_type_aliases/old_version: FormatterCrash
nonfunction_type_aliases/unaliased_bounds_checks_in_constructor_calls: FormatterCrash
rasta/bad_redirection: FormatterCrash
rasta/issue_000032: FormatterCrash
@@ -1,7 +1,7 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
class Operators1 {
operator >>>() => true;
}
@@ -1,11 +1,7 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/triple_shift/invalid_operator.dart:4:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// // @dart=2.9
// ^^^^^^^^^^^^
//
// pkg/front_end/testcases/triple_shift/invalid_operator.dart:6:12: Error: Operator '>>>' should have exactly one parameter.
// operator >>>() => true;
// ^^^
@@ -39,123 +35,53 @@ import self as self;
import "dart:core" as core;
class Operators1 extends core::Object {
synthetic constructor •() → self::Operators1*
synthetic constructor •() → self::Operators1
: super core::Object::•()
;
operator >>>() → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators2 extends core::Object {
synthetic constructor •() → self::Operators2*
synthetic constructor •() → self::Operators2
: super core::Object::•()
;
operator >>>(dynamic a, dynamic b) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators3 extends core::Object {
synthetic constructor •() → self::Operators3*
synthetic constructor •() → self::Operators3
: super core::Object::•()
;
operator >>>([dynamic a = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators4 extends core::Object {
synthetic constructor •() → self::Operators4*
synthetic constructor •() → self::Operators4
: super core::Object::•()
;
operator >>>({dynamic a = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators5 extends core::Object {
synthetic constructor •() → self::Operators5*
synthetic constructor •() → self::Operators5
: super core::Object::•()
;
operator >>>(dynamic a, [dynamic b = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators6 extends core::Object {
synthetic constructor •() → self::Operators6*
synthetic constructor •() → self::Operators6
: super core::Object::•()
;
operator >>>(dynamic a, {dynamic b = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators7 extends core::Object {
synthetic constructor •() → self::Operators7*
synthetic constructor •() → self::Operators7
: super core::Object::•()
;
operator >>><T extends core::Object* = dynamic>(dynamic a) → dynamic
operator >>><T extends core::Object? = dynamic>(dynamic a) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic {}
@@ -1,11 +1,7 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/triple_shift/invalid_operator.dart:4:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// // @dart=2.9
// ^^^^^^^^^^^^
//
// pkg/front_end/testcases/triple_shift/invalid_operator.dart:6:12: Error: Operator '>>>' should have exactly one parameter.
// operator >>>() => true;
// ^^^
@@ -39,123 +35,53 @@ import self as self;
import "dart:core" as core;
class Operators1 extends core::Object {
synthetic constructor •() → self::Operators1*
synthetic constructor •() → self::Operators1
: super core::Object::•()
;
operator >>>() → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators2 extends core::Object {
synthetic constructor •() → self::Operators2*
synthetic constructor •() → self::Operators2
: super core::Object::•()
;
operator >>>(dynamic a, dynamic b) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators3 extends core::Object {
synthetic constructor •() → self::Operators3*
synthetic constructor •() → self::Operators3
: super core::Object::•()
;
operator >>>([dynamic a = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators4 extends core::Object {
synthetic constructor •() → self::Operators4*
synthetic constructor •() → self::Operators4
: super core::Object::•()
;
operator >>>({dynamic a = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators5 extends core::Object {
synthetic constructor •() → self::Operators5*
synthetic constructor •() → self::Operators5
: super core::Object::•()
;
operator >>>(dynamic a, [dynamic b = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators6 extends core::Object {
synthetic constructor •() → self::Operators6*
synthetic constructor •() → self::Operators6
: super core::Object::•()
;
operator >>>(dynamic a, {dynamic b = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators7 extends core::Object {
synthetic constructor •() → self::Operators7*
synthetic constructor •() → self::Operators7
: super core::Object::•()
;
operator >>><T extends core::Object* = dynamic>(dynamic a) → dynamic
operator >>><T extends core::Object? = dynamic>(dynamic a) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic {}
@@ -1,4 +1,3 @@
// @dart = 2.9
class Operators1 {
operator >>(){}
operator>() => true;
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -35,123 +35,53 @@ import self as self;
import "dart:core" as core;
class Operators1 extends core::Object {
synthetic constructor •() → self::Operators1*
synthetic constructor •() → self::Operators1
: super core::Object::•()
;
operator >>>() → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators2 extends core::Object {
synthetic constructor •() → self::Operators2*
synthetic constructor •() → self::Operators2
: super core::Object::•()
;
operator >>>(dynamic a, dynamic b) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators3 extends core::Object {
synthetic constructor •() → self::Operators3*
synthetic constructor •() → self::Operators3
: super core::Object::•()
;
operator >>>([dynamic a = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators4 extends core::Object {
synthetic constructor •() → self::Operators4*
synthetic constructor •() → self::Operators4
: super core::Object::•()
;
operator >>>({dynamic a = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators5 extends core::Object {
synthetic constructor •() → self::Operators5*
synthetic constructor •() → self::Operators5
: super core::Object::•()
;
operator >>>(dynamic a, [dynamic b = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators6 extends core::Object {
synthetic constructor •() → self::Operators6*
synthetic constructor •() → self::Operators6
: super core::Object::•()
;
operator >>>(dynamic a, {dynamic b = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators7 extends core::Object {
synthetic constructor •() → self::Operators7*
synthetic constructor •() → self::Operators7
: super core::Object::•()
;
operator >>><T extends core::Object* = dynamic>(dynamic a) → dynamic
operator >>><T extends core::Object? = dynamic>(dynamic a) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic {}
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -35,116 +35,46 @@ import self as self;
import "dart:core" as core;
class Operators1 extends core::Object {
synthetic constructor •() → self::Operators1*
synthetic constructor •() → self::Operators1
;
operator >>>() → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators2 extends core::Object {
synthetic constructor •() → self::Operators2*
synthetic constructor •() → self::Operators2
;
operator >>>(dynamic a, dynamic b) → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators3 extends core::Object {
synthetic constructor •() → self::Operators3*
synthetic constructor •() → self::Operators3
;
operator >>>([dynamic a]) → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators4 extends core::Object {
synthetic constructor •() → self::Operators4*
synthetic constructor •() → self::Operators4
;
operator >>>({dynamic a}) → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators5 extends core::Object {
synthetic constructor •() → self::Operators5*
synthetic constructor •() → self::Operators5
;
operator >>>(dynamic a, [dynamic b]) → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators6 extends core::Object {
synthetic constructor •() → self::Operators6*
synthetic constructor •() → self::Operators6
;
operator >>>(dynamic a, {dynamic b}) → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators7 extends core::Object {
synthetic constructor •() → self::Operators7*
synthetic constructor •() → self::Operators7
;
operator >>><T extends core::Object* = dynamic>(dynamic a) → dynamic
operator >>><T extends core::Object? = dynamic>(dynamic a) → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic
;
@@ -1,4 +1,4 @@
library;
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
@@ -35,123 +35,53 @@ import self as self;
import "dart:core" as core;
class Operators1 extends core::Object {
synthetic constructor •() → self::Operators1*
synthetic constructor •() → self::Operators1
: super core::Object::•()
;
operator >>>() → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators2 extends core::Object {
synthetic constructor •() → self::Operators2*
synthetic constructor •() → self::Operators2
: super core::Object::•()
;
operator >>>(dynamic a, dynamic b) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators3 extends core::Object {
synthetic constructor •() → self::Operators3*
synthetic constructor •() → self::Operators3
: super core::Object::•()
;
operator >>>([dynamic a = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators4 extends core::Object {
synthetic constructor •() → self::Operators4*
synthetic constructor •() → self::Operators4
: super core::Object::•()
;
operator >>>({dynamic a = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators5 extends core::Object {
synthetic constructor •() → self::Operators5*
synthetic constructor •() → self::Operators5
: super core::Object::•()
;
operator >>>(dynamic a, [dynamic b = #C1]) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators6 extends core::Object {
synthetic constructor •() → self::Operators6*
synthetic constructor •() → self::Operators6
: super core::Object::•()
;
operator >>>(dynamic a, {dynamic b = #C1}) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Operators7 extends core::Object {
synthetic constructor •() → self::Operators7*
synthetic constructor •() → self::Operators7
: super core::Object::•()
;
operator >>><T extends core::Object* = dynamic>(dynamic a) → dynamic
operator >>><T extends core::Object? = dynamic>(dynamic a) → dynamic
return true;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic {}
@@ -1,7 +1,7 @@
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
class A<out X, in Y, inout Z> {}
main() {
@@ -1,3 +1,2 @@
// @dart = 2.9
class A<out X, in Y, inout Z> {}
main() {}
@@ -1,22 +1,12 @@
library;
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
class A<X extends core::Object* = dynamic, contravariant Y extends core::Object* = dynamic, invariant Z extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::A<self::A::X*, self::A::Y*, self::A::Z*>*
class A<X extends core::Object? = dynamic, contravariant Y extends core::Object? = dynamic, invariant Z extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::A<self::A::X%, self::A::Y%, self::A::Z%>
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic {
self::A<dynamic, dynamic, dynamic>* a = new self::A::•<dynamic, dynamic, dynamic>();
self::A<dynamic, dynamic, dynamic> a = new self::A::•<dynamic, dynamic, dynamic>();
}
@@ -1,20 +1,10 @@
library;
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
class A<X extends core::Object* = dynamic, contravariant Y extends core::Object* = dynamic, invariant Z extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::A<self::A::X*, self::A::Y*, self::A::Z*>*
class A<X extends core::Object? = dynamic, contravariant Y extends core::Object? = dynamic, invariant Z extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::A<self::A::X%, self::A::Y%, self::A::Z%>
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic
;
@@ -1,22 +1,12 @@
library;
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
class A<X extends core::Object* = dynamic, contravariant Y extends core::Object* = dynamic, invariant Z extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::A<self::A::X*, self::A::Y*, self::A::Z*>*
class A<X extends core::Object? = dynamic, contravariant Y extends core::Object? = dynamic, invariant Z extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::A<self::A::X%, self::A::Y%, self::A::Z%>
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
static method main() → dynamic {
self::A<dynamic, dynamic, dynamic>* a = new self::A::•<dynamic, dynamic, dynamic>();
self::A<dynamic, dynamic, dynamic> a = new self::A::•<dynamic, dynamic, dynamic>();
}
@@ -1,16 +1,16 @@
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
typedef ContraFunction<T> = void Function(T);
typedef InvFunction<T> = T Function(T);
class Contravariant<in T> {}
class Invariant<inout T> {}
class A<in T, out U, V> {
final void Function(T) field = null;
final void Function(T)? field = null;
void method(T t, void Function(U) u, V v) {}
void method2(T x, [T y]) {}
void method2(T x, [T? y]) {}
void set x(T t) {}
Map<U, Contravariant<V>> get mapContra => new Map<U, Contravariant<V>>();
Map<U, ContraFunction<V>> get mapContraFn => new Map<U, ContraFunction<V>>();
@@ -19,14 +19,14 @@ class A<in T, out U, V> {
}
class B<inout T> {
T x;
T? x;
T method(T x) => x;
void set y(T x) {}
}
class C<in T> {
final void Function(T) field = null;
void method(T x, [T y]) {}
final void Function(T)? field = null;
void method(T x, [T? y]) {}
void set x(T t) {}
}
@@ -39,6 +39,7 @@ class E<inout T> {
E(this.f);
int method(T x) {
f(x);
return 0;
}
}
@@ -1,12 +1,11 @@
// @dart = 2.9
typedef ContraFunction<T> = void Function(T);
typedef InvFunction<T> = T Function(T);
class Contravariant<in T> {}
class Invariant<inout T> {}
class A<in T, out U, V> {
final void Function(T) field = null;
final void Function(T)? field = null;
void method(T t, void Function(U) u, V v) {}
void method2(T x, [T y]) {}
void method2(T x, [T? y]) {}
void set x(T t) {}
Map<U, Contravariant<V>> get mapContra => new Map<U, Contravariant<V>>();
Map<U, ContraFunction<V>> get mapContraFn => new Map<U, ContraFunction<V>>();
@@ -14,13 +13,13 @@ class A<in T, out U, V> {
Map<U, InvFunction<V>> get mapInvFn => new Map<U, InvFunction<V>>();
}
class B<inout T> {
T x;
T? x;
T method(T x) => x;
void set y(T x) {}
}
class C<in T> {
final void Function(T) field = null;
void method(T x, [T y]) {}
final void Function(T)? field = null;
void method(T x, [T? y]) {}
void set x(T t) {}
}
abstract class D<T> {
@@ -1,191 +1,113 @@
library;
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
typedef ContraFunction<contravariant T extends core::Object* = dynamic> = (T*) →* void;
typedef InvFunction<invariant T extends core::Object* = dynamic> = (T*) →* T*;
class Contravariant<contravariant T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::Contravariant<self::Contravariant::T*>*
typedef ContraFunction<contravariant T extends core::Object? = dynamic> = (T%) → void;
typedef InvFunction<invariant T extends core::Object? = dynamic> = (T%) → T%;
class Contravariant<contravariant T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::Contravariant<self::Contravariant::T%>
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Invariant<invariant T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::Invariant<self::Invariant::T*>*
class Invariant<invariant T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::Invariant<self::Invariant::T%>
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class A<contravariant T extends core::Object* = dynamic, U extends core::Object* = dynamic, V extends core::Object* = dynamic> extends core::Object {
final field (self::A::T*) →* void field = null;
synthetic constructor •() → self::A<self::A::T*, self::A::U*, self::A::V*>*
class A<contravariant T extends core::Object? = dynamic, U extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
final field (self::A::T%) →? void field = null;
synthetic constructor •() → self::A<self::A::T%, self::A::U%, self::A::V%>
: super core::Object::•()
;
method method(self::A::T* t, (self::A::U*) →* void u, generic-covariant-impl self::A::V* v) → void {}
method method2(self::A::T* x, [self::A::T* y = #C1]) → void {}
set x(self::A::T* t) → void {}
get mapContra() → core::Map<self::A::U*, self::Contravariant<self::A::V*>*>*
return core::Map::•<self::A::U*, self::Contravariant<self::A::V*>*>();
get mapContraFn() → core::Map<self::A::U*, (self::A::V*) →* void>*
return core::Map::•<self::A::U*, (self::A::V*) →* void>();
get mapInv() → core::Map<self::A::U*, self::Invariant<self::A::V*>*>*
return core::Map::•<self::A::U*, self::Invariant<self::A::V*>*>();
get mapInvFn() → core::Map<self::A::U*, (self::A::V*) →* self::A::V*>*
return core::Map::•<self::A::U*, (self::A::V*) →* self::A::V*>();
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
method method(self::A::T% t, (self::A::U%) → void u, generic-covariant-impl self::A::V% v) → void {}
method method2(self::A::T% x, [self::A::T? y = #C1]) → void {}
set x(self::A::T% t) → void {}
get mapContra() → core::Map<self::A::U%, self::Contravariant<self::A::V%>>
return core::Map::•<self::A::U%, self::Contravariant<self::A::V%>>();
get mapContraFn() → core::Map<self::A::U%, (self::A::V%) → void>
return core::Map::•<self::A::U%, (self::A::V%) → void>();
get mapInv() → core::Map<self::A::U%, self::Invariant<self::A::V%>>
return core::Map::•<self::A::U%, self::Invariant<self::A::V%>>();
get mapInvFn() → core::Map<self::A::U%, (self::A::V%) → self::A::V%>
return core::Map::•<self::A::U%, (self::A::V%) → self::A::V%>();
}
class B<invariant T extends core::Object* = dynamic> extends core::Object {
field self::B::T* x = null;
synthetic constructor •() → self::B<self::B::T*>*
class B<invariant T extends core::Object? = dynamic> extends core::Object {
field self::B::T? x = null;
synthetic constructor •() → self::B<self::B::T%>
: super core::Object::•()
;
method method(self::B::T* x) → self::B::T*
method method(self::B::T% x) → self::B::T%
return x;
set y(self::B::T* x) → void {}
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
set y(self::B::T% x) → void {}
}
class C<contravariant T extends core::Object* = dynamic> extends core::Object {
final field (self::C::T*) →* void field = null;
synthetic constructor •() → self::C<self::C::T*>*
class C<contravariant T extends core::Object? = dynamic> extends core::Object {
final field (self::C::T%) →? void field = null;
synthetic constructor •() → self::C<self::C::T%>
: super core::Object::•()
;
method method(self::C::T* x, [self::C::T* y = #C1]) → void {}
set x(self::C::T* t) → void {}
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
method method(self::C::T% x, [self::C::T? y = #C1]) → void {}
set x(self::C::T% t) → void {}
}
abstract class D<T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::D<self::D::T*>*
abstract class D<T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::D<self::D::T%>
: super core::Object::•()
;
abstract method method(generic-covariant-impl self::D::T* x) → core::int*;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
abstract method method(generic-covariant-impl self::D::T% x) → core::int;
}
class E<invariant T extends core::Object* = dynamic> extends core::Object {
final field (self::E::T*) →* void f;
constructor •((self::E::T*) →* void f) → self::E<self::E::T*>*
class E<invariant T extends core::Object? = dynamic> extends core::Object {
final field (self::E::T%) → void f;
constructor •((self::E::T%) → void f) → self::E<self::E::T%>
: self::E::f = f, super core::Object::•()
;
method method(self::E::T* x) → core::int* {
let final self::E::T* #t1 = x in this.{self::E::f}.call(#t1);
method method(self::E::T% x) → core::int {
let final self::E::T% #t1 = x in this.{self::E::f}.call(#t1);
return 0;
}
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F<invariant T extends core::Object* = dynamic> extends self::E<self::F::T*> implements self::D<self::F::T*> {
constructor •((self::F::T*) →* void f) → self::F<self::F::T*>*
class F<invariant T extends core::Object? = dynamic> extends self::E<self::F::T%> implements self::D<self::F::T%> {
constructor •((self::F::T%) → void f) → self::F<self::F::T%>
: super self::E::•(f)
;
forwarding-stub method method(generic-covariant-impl self::F::T* x) → core::int*
forwarding-stub method method(generic-covariant-impl self::F::T% x) → core::int
return super.{self::E::method}(x);
}
class NoSuchMethod<invariant T extends core::Object* = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T*> {
synthetic constructor •() → self::NoSuchMethod<self::NoSuchMethod::T*>*
class NoSuchMethod<invariant T extends core::Object? = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T%> {
synthetic constructor •() → self::NoSuchMethod<self::NoSuchMethod::T%>
: super core::Object::•()
;
method noSuchMethod(core::Invocation* _) → dynamic
method noSuchMethod(core::Invocation _) → dynamic
return 3;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
no-such-method-forwarder get x() → self::NoSuchMethod::T*
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic} self::NoSuchMethod::T*;
no-such-method-forwarder method method(self::NoSuchMethod::T* x) → self::NoSuchMethod::T*
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic} self::NoSuchMethod::T*;
no-such-method-forwarder set y(self::NoSuchMethod::T* x) → void
no-such-method-forwarder get x() → self::NoSuchMethod::T?
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic,ForNonNullableByDefault} self::NoSuchMethod::T?;
no-such-method-forwarder method method(self::NoSuchMethod::T% x) → self::NoSuchMethod::T%
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic,ForNonNullableByDefault} self::NoSuchMethod::T%;
no-such-method-forwarder set y(self::NoSuchMethod::T% x) → void
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 2, #C3, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5)));
no-such-method-forwarder set x(self::NoSuchMethod::T* value) → void
no-such-method-forwarder set x(self::NoSuchMethod::T? value) → void
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 2, #C3, core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5)));
}
static method main() → dynamic {
self::A<core::int*, core::num*, core::String*>* a = new self::A::•<core::int*, core::num*, core::String*>();
self::A<core::int, core::num, core::String> a = new self::A::•<core::int, core::num, core::String>();
self::expect(null, a.{self::A::field});
a.{self::A::method}(3, (core::num* num) → Null {}, "test");
a.{self::A::method}(3, (core::num num) → void {}, "test");
a.{self::A::method2}(3);
a.{self::A::x} = 3;
core::Map<core::num*, self::Contravariant<core::String*>*>* mapContra = a.{self::A::mapContra} as{TypeError,CovarianceCheck} core::Map<core::num*, self::Contravariant<core::String*>*>*;
core::Map<core::num*, (core::String*) →* void>* mapContraFn = a.{self::A::mapContraFn} as{TypeError,CovarianceCheck} core::Map<core::num*, (core::String*) →* void>*;
core::Map<core::num*, self::Invariant<core::String*>*>* mapInv = a.{self::A::mapInv} as{TypeError,CovarianceCheck} core::Map<core::num*, self::Invariant<core::String*>*>*;
core::Map<core::num*, (core::String*) →* core::String*>* mapInvFn = a.{self::A::mapInvFn} as{TypeError,CovarianceCheck} core::Map<core::num*, (core::String*) →* core::String*>*;
self::B<core::int*>* b = new self::B::•<core::int*>();
core::Map<core::num, self::Contravariant<core::String>> mapContra = a.{self::A::mapContra} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, self::Contravariant<core::String>>;
core::Map<core::num, (core::String) → void> mapContraFn = a.{self::A::mapContraFn} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, (core::String) → void>;
core::Map<core::num, self::Invariant<core::String>> mapInv = a.{self::A::mapInv} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, self::Invariant<core::String>>;
core::Map<core::num, (core::String) → core::String> mapInvFn = a.{self::A::mapInvFn} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, (core::String) → core::String>;
self::B<core::int> b = new self::B::•<core::int>();
b.{self::B::x} = 3;
self::expect(3, b.{self::B::x});
self::expect(3, b.{self::B::method}(3));
b.{self::B::y} = 3;
self::C<core::int*>* c = new self::C::•<core::int*>();
self::C<core::int> c = new self::C::•<core::int>();
self::expect(null, c.{self::C::field});
c.{self::C::method}(3, 2);
c.{self::C::x} = 3;
self::D<core::Object*>* d = new self::F::•<core::String*>((core::String* s) → Null {});
self::D<core::Object> d = new self::F::•<core::String>((core::String s) → void {});
d.{self::D::method}("test");
self::NoSuchMethod<core::num*>* nsm = new self::NoSuchMethod::•<core::num*>();
self::NoSuchMethod<core::num> nsm = new self::NoSuchMethod::•<core::num>();
self::expect(3, nsm.{self::B::method}(3));
}
static method expect(dynamic expected, dynamic actual) → dynamic {
@@ -1,163 +1,84 @@
library;
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
typedef ContraFunction<contravariant T extends core::Object* = dynamic> = (T*) →* void;
typedef InvFunction<invariant T extends core::Object* = dynamic> = (T*) →* T*;
class Contravariant<contravariant T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::Contravariant<self::Contravariant::T*>*
typedef ContraFunction<contravariant T extends core::Object? = dynamic> = (T%) → void;
typedef InvFunction<invariant T extends core::Object? = dynamic> = (T%) → T%;
class Contravariant<contravariant T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::Contravariant<self::Contravariant::T%>
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Invariant<invariant T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::Invariant<self::Invariant::T*>*
class Invariant<invariant T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::Invariant<self::Invariant::T%>
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class A<contravariant T extends core::Object* = dynamic, U extends core::Object* = dynamic, V extends core::Object* = dynamic> extends core::Object {
final field (self::A::T*) →* void field;
synthetic constructor •() → self::A<self::A::T*, self::A::U*, self::A::V*>*
class A<contravariant T extends core::Object? = dynamic, U extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
final field (self::A::T%) →? void field;
synthetic constructor •() → self::A<self::A::T%, self::A::U%, self::A::V%>
;
method method(self::A::T* t, (self::A::U*) →* void u, generic-covariant-impl self::A::V* v) → void
method method(self::A::T% t, (self::A::U%) → void u, generic-covariant-impl self::A::V% v) → void
;
method method2(self::A::T* x, [self::A::T* y]) → void
method method2(self::A::T% x, [self::A::T? y]) → void
;
set x(self::A::T* t) → void
set x(self::A::T% t) → void
;
get mapContra() → core::Map<self::A::U*, self::Contravariant<self::A::V*>*>*
get mapContra() → core::Map<self::A::U%, self::Contravariant<self::A::V%>>
;
get mapContraFn() → core::Map<self::A::U*, (self::A::V*) →* void>*
get mapContraFn() → core::Map<self::A::U%, (self::A::V%) → void>
;
get mapInv() → core::Map<self::A::U*, self::Invariant<self::A::V*>*>*
get mapInv() → core::Map<self::A::U%, self::Invariant<self::A::V%>>
;
get mapInvFn() → core::Map<self::A::U*, (self::A::V*) →* self::A::V*>*
get mapInvFn() → core::Map<self::A::U%, (self::A::V%) → self::A::V%>
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class B<invariant T extends core::Object* = dynamic> extends core::Object {
field self::B::T* x;
synthetic constructor •() → self::B<self::B::T*>*
class B<invariant T extends core::Object? = dynamic> extends core::Object {
field self::B::T? x;
synthetic constructor •() → self::B<self::B::T%>
;
method method(self::B::T* x) → self::B::T*
method method(self::B::T% x) → self::B::T%
;
set y(self::B::T* x) → void
set y(self::B::T% x) → void
;
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class C<contravariant T extends core::Object* = dynamic> extends core::Object {
final field (self::C::T*) →* void field;
synthetic constructor •() → self::C<self::C::T*>*
class C<contravariant T extends core::Object? = dynamic> extends core::Object {
final field (self::C::T%) →? void field;
synthetic constructor •() → self::C<self::C::T%>
;
method method(self::C::T* x, [self::C::T* y]) → void
method method(self::C::T% x, [self::C::T? y]) → void
;
set x(self::C::T* t) → void
set x(self::C::T% t) → void
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
abstract class D<T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::D<self::D::T*>*
abstract class D<T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::D<self::D::T%>
;
abstract method method(generic-covariant-impl self::D::T* x) → core::int*;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
abstract method method(generic-covariant-impl self::D::T% x) → core::int;
}
class E<invariant T extends core::Object* = dynamic> extends core::Object {
final field (self::E::T*) →* void f;
constructor •((self::E::T*) →* void f) → self::E<self::E::T*>*
class E<invariant T extends core::Object? = dynamic> extends core::Object {
final field (self::E::T%) → void f;
constructor •((self::E::T%) → void f) → self::E<self::E::T%>
;
method method(self::E::T* x) → core::int*
method method(self::E::T% x) → core::int
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F<invariant T extends core::Object* = dynamic> extends self::E<self::F::T*> implements self::D<self::F::T*> {
constructor •((self::F::T*) →* void f) → self::F<self::F::T*>*
class F<invariant T extends core::Object? = dynamic> extends self::E<self::F::T%> implements self::D<self::F::T%> {
constructor •((self::F::T%) → void f) → self::F<self::F::T%>
;
forwarding-stub method method(generic-covariant-impl self::F::T* x) → core::int*
forwarding-stub method method(generic-covariant-impl self::F::T% x) → core::int
return super.{self::E::method}(x);
}
class NoSuchMethod<invariant T extends core::Object* = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T*> {
synthetic constructor •() → self::NoSuchMethod<self::NoSuchMethod::T*>*
class NoSuchMethod<invariant T extends core::Object? = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T%> {
synthetic constructor •() → self::NoSuchMethod<self::NoSuchMethod::T%>
;
method noSuchMethod(core::Invocation* _) → dynamic
method noSuchMethod(core::Invocation _) → dynamic
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
no-such-method-forwarder get x() → self::NoSuchMethod::T*
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#x, 1, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))) as{TypeError,ForDynamic} self::NoSuchMethod::T*;
no-such-method-forwarder method method(self::NoSuchMethod::T* x) → self::NoSuchMethod::T*
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#method, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))) as{TypeError,ForDynamic} self::NoSuchMethod::T*;
no-such-method-forwarder set y(self::NoSuchMethod::T* x) → void
no-such-method-forwarder get x() → self::NoSuchMethod::T?
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#x, 1, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))) as{TypeError,ForDynamic,ForNonNullableByDefault} self::NoSuchMethod::T?;
no-such-method-forwarder method method(self::NoSuchMethod::T% x) → self::NoSuchMethod::T%
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#method, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))) as{TypeError,ForDynamic,ForNonNullableByDefault} self::NoSuchMethod::T%;
no-such-method-forwarder set y(self::NoSuchMethod::T% x) → void
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#y=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
no-such-method-forwarder set x(self::NoSuchMethod::T* value) → void
no-such-method-forwarder set x(self::NoSuchMethod::T? value) → void
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#x=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
}
static method main() → dynamic
@@ -167,17 +88,17 @@ static method expect(dynamic expected, dynamic actual) → dynamic
Extra constant evaluation status:
Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:5 -> SymbolConstant(#x)
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:5 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:5 -> ListConstant(const <dynamic>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:5 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> SymbolConstant(#x)
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> ListConstant(const <dynamic>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:23:5 -> SymbolConstant(#method)
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:23:5 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:23:5 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:24:12 -> SymbolConstant(#y=)
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:24:12 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:24:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:5 -> SymbolConstant(#x=)
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:5 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:5 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> SymbolConstant(#x=)
Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
Extra constant evaluation: evaluated: 42, effectively constant: 13
@@ -1,191 +1,113 @@
library;
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
typedef ContraFunction<contravariant T extends core::Object* = dynamic> = (T*) →* void;
typedef InvFunction<invariant T extends core::Object* = dynamic> = (T*) →* T*;
class Contravariant<contravariant T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::Contravariant<self::Contravariant::T*>*
typedef ContraFunction<contravariant T extends core::Object? = dynamic> = (T%) → void;
typedef InvFunction<invariant T extends core::Object? = dynamic> = (T%) → T%;
class Contravariant<contravariant T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::Contravariant<self::Contravariant::T%>
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class Invariant<invariant T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::Invariant<self::Invariant::T*>*
class Invariant<invariant T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::Invariant<self::Invariant::T%>
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class A<contravariant T extends core::Object* = dynamic, U extends core::Object* = dynamic, V extends core::Object* = dynamic> extends core::Object {
final field (self::A::T*) →* void field = null;
synthetic constructor •() → self::A<self::A::T*, self::A::U*, self::A::V*>*
class A<contravariant T extends core::Object? = dynamic, U extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
final field (self::A::T%) →? void field = null;
synthetic constructor •() → self::A<self::A::T%, self::A::U%, self::A::V%>
: super core::Object::•()
;
method method(self::A::T* t, (self::A::U*) →* void u, generic-covariant-impl self::A::V* v) → void {}
method method2(self::A::T* x, [self::A::T* y = #C1]) → void {}
set x(self::A::T* t) → void {}
get mapContra() → core::Map<self::A::U*, self::Contravariant<self::A::V*>*>*
return core::Map::•<self::A::U*, self::Contravariant<self::A::V*>*>();
get mapContraFn() → core::Map<self::A::U*, (self::A::V*) →* void>*
return core::Map::•<self::A::U*, (self::A::V*) →* void>();
get mapInv() → core::Map<self::A::U*, self::Invariant<self::A::V*>*>*
return core::Map::•<self::A::U*, self::Invariant<self::A::V*>*>();
get mapInvFn() → core::Map<self::A::U*, (self::A::V*) →* self::A::V*>*
return core::Map::•<self::A::U*, (self::A::V*) →* self::A::V*>();
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
method method(self::A::T% t, (self::A::U%) → void u, generic-covariant-impl self::A::V% v) → void {}
method method2(self::A::T% x, [self::A::T? y = #C1]) → void {}
set x(self::A::T% t) → void {}
get mapContra() → core::Map<self::A::U%, self::Contravariant<self::A::V%>>
return core::Map::•<self::A::U%, self::Contravariant<self::A::V%>>();
get mapContraFn() → core::Map<self::A::U%, (self::A::V%) → void>
return core::Map::•<self::A::U%, (self::A::V%) → void>();
get mapInv() → core::Map<self::A::U%, self::Invariant<self::A::V%>>
return core::Map::•<self::A::U%, self::Invariant<self::A::V%>>();
get mapInvFn() → core::Map<self::A::U%, (self::A::V%) → self::A::V%>
return core::Map::•<self::A::U%, (self::A::V%) → self::A::V%>();
}
class B<invariant T extends core::Object* = dynamic> extends core::Object {
field self::B::T* x = null;
synthetic constructor •() → self::B<self::B::T*>*
class B<invariant T extends core::Object? = dynamic> extends core::Object {
field self::B::T? x = null;
synthetic constructor •() → self::B<self::B::T%>
: super core::Object::•()
;
method method(self::B::T* x) → self::B::T*
method method(self::B::T% x) → self::B::T%
return x;
set y(self::B::T* x) → void {}
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
set y(self::B::T% x) → void {}
}
class C<contravariant T extends core::Object* = dynamic> extends core::Object {
final field (self::C::T*) →* void field = null;
synthetic constructor •() → self::C<self::C::T*>*
class C<contravariant T extends core::Object? = dynamic> extends core::Object {
final field (self::C::T%) →? void field = null;
synthetic constructor •() → self::C<self::C::T%>
: super core::Object::•()
;
method method(self::C::T* x, [self::C::T* y = #C1]) → void {}
set x(self::C::T* t) → void {}
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
method method(self::C::T% x, [self::C::T? y = #C1]) → void {}
set x(self::C::T% t) → void {}
}
abstract class D<T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() → self::D<self::D::T*>*
abstract class D<T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::D<self::D::T%>
: super core::Object::•()
;
abstract method method(generic-covariant-impl self::D::T* x) → core::int*;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
abstract method method(generic-covariant-impl self::D::T% x) → core::int;
}
class E<invariant T extends core::Object* = dynamic> extends core::Object {
final field (self::E::T*) →* void f;
constructor •((self::E::T*) →* void f) → self::E<self::E::T*>*
class E<invariant T extends core::Object? = dynamic> extends core::Object {
final field (self::E::T%) → void f;
constructor •((self::E::T%) → void f) → self::E<self::E::T%>
: self::E::f = f, super core::Object::•()
;
method method(self::E::T* x) → core::int* {
let final self::E::T* #t1 = x in this.{self::E::f}.call(#t1);
method method(self::E::T% x) → core::int {
let final self::E::T% #t1 = x in this.{self::E::f}.call(#t1);
return 0;
}
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
class F<invariant T extends core::Object* = dynamic> extends self::E<self::F::T*> implements self::D<self::F::T*> {
constructor •((self::F::T*) →* void f) → self::F<self::F::T*>*
class F<invariant T extends core::Object? = dynamic> extends self::E<self::F::T%> implements self::D<self::F::T%> {
constructor •((self::F::T%) → void f) → self::F<self::F::T%>
: super self::E::•(f)
;
forwarding-stub method method(generic-covariant-impl self::F::T* x) → core::int*
forwarding-stub method method(generic-covariant-impl self::F::T% x) → core::int
return super.{self::E::method}(x);
}
class NoSuchMethod<invariant T extends core::Object* = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T*> {
synthetic constructor •() → self::NoSuchMethod<self::NoSuchMethod::T*>*
class NoSuchMethod<invariant T extends core::Object? = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T%> {
synthetic constructor •() → self::NoSuchMethod<self::NoSuchMethod::T%>
: super core::Object::•()
;
method noSuchMethod(core::Invocation* _) → dynamic
method noSuchMethod(core::Invocation _) → dynamic
return 3;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
no-such-method-forwarder get x() → self::NoSuchMethod::T*
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic} self::NoSuchMethod::T*;
no-such-method-forwarder method method(self::NoSuchMethod::T* x) → self::NoSuchMethod::T*
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic} self::NoSuchMethod::T*;
no-such-method-forwarder set y(self::NoSuchMethod::T* x) → void
no-such-method-forwarder get x() → self::NoSuchMethod::T?
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic,ForNonNullableByDefault} self::NoSuchMethod::T?;
no-such-method-forwarder method method(self::NoSuchMethod::T% x) → self::NoSuchMethod::T%
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))) as{TypeError,ForDynamic,ForNonNullableByDefault} self::NoSuchMethod::T%;
no-such-method-forwarder set y(self::NoSuchMethod::T% x) → void
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 2, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5)));
no-such-method-forwarder set x(self::NoSuchMethod::T* value) → void
no-such-method-forwarder set x(self::NoSuchMethod::T? value) → void
return this.{self::NoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 2, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(value)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5)));
}
static method main() → dynamic {
self::A<core::int*, core::num*, core::String*>* a = new self::A::•<core::int*, core::num*, core::String*>();
self::A<core::int, core::num, core::String> a = new self::A::•<core::int, core::num, core::String>();
self::expect(null, a.{self::A::field});
a.{self::A::method}(3, (core::num* num) → Null {}, "test");
a.{self::A::method}(3, (core::num num) → void {}, "test");
a.{self::A::method2}(3);
a.{self::A::x} = 3;
core::Map<core::num*, self::Contravariant<core::String*>*>* mapContra = a.{self::A::mapContra} as{TypeError,CovarianceCheck} core::Map<core::num*, self::Contravariant<core::String*>*>*;
core::Map<core::num*, (core::String*) →* void>* mapContraFn = a.{self::A::mapContraFn} as{TypeError,CovarianceCheck} core::Map<core::num*, (core::String*) →* void>*;
core::Map<core::num*, self::Invariant<core::String*>*>* mapInv = a.{self::A::mapInv} as{TypeError,CovarianceCheck} core::Map<core::num*, self::Invariant<core::String*>*>*;
core::Map<core::num*, (core::String*) →* core::String*>* mapInvFn = a.{self::A::mapInvFn} as{TypeError,CovarianceCheck} core::Map<core::num*, (core::String*) →* core::String*>*;
self::B<core::int*>* b = new self::B::•<core::int*>();
core::Map<core::num, self::Contravariant<core::String>> mapContra = a.{self::A::mapContra} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, self::Contravariant<core::String>>;
core::Map<core::num, (core::String) → void> mapContraFn = a.{self::A::mapContraFn} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, (core::String) → void>;
core::Map<core::num, self::Invariant<core::String>> mapInv = a.{self::A::mapInv} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, self::Invariant<core::String>>;
core::Map<core::num, (core::String) → core::String> mapInvFn = a.{self::A::mapInvFn} as{TypeError,CovarianceCheck,ForNonNullableByDefault} core::Map<core::num, (core::String) → core::String>;
self::B<core::int> b = new self::B::•<core::int>();
b.{self::B::x} = 3;
self::expect(3, b.{self::B::x});
self::expect(3, b.{self::B::method}(3));
b.{self::B::y} = 3;
self::C<core::int*>* c = new self::C::•<core::int*>();
self::C<core::int> c = new self::C::•<core::int>();
self::expect(null, c.{self::C::field});
c.{self::C::method}(3, 2);
c.{self::C::x} = 3;
self::D<core::Object*>* d = new self::F::•<core::String*>((core::String* s) → Null {});
self::D<core::Object> d = new self::F::•<core::String>((core::String s) → void {});
d.{self::D::method}("test");
self::NoSuchMethod<core::num*>* nsm = new self::NoSuchMethod::•<core::num*>();
self::NoSuchMethod<core::num> nsm = new self::NoSuchMethod::•<core::num>();
self::expect(3, nsm.{self::B::method}(3));
}
static method expect(dynamic expected, dynamic actual) → dynamic {
@@ -1,7 +1,7 @@
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart=2.9
class A {}
mixin B<inout X, out Y, in Z> on A {}
@@ -1,4 +1,3 @@
// @dart = 2.9
class A {}
mixin B<inout X, out Y, in Z> on A {}
main() {}
@@ -1,22 +1,12 @@
library;
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() → self::A*
synthetic constructor •() → self::A
: super core::Object::•()
;
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
abstract member-signature method toString() → core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
abstract class B<invariant X extends core::Object* = dynamic, Y extends core::Object* = dynamic, contravariant Z extends core::Object* = dynamic> extends self::A /*isMixinDeclaration*/ {
abstract class B<invariant X extends core::Object? = dynamic, Y extends core::Object? = dynamic, contravariant Z extends core::Object? = dynamic> extends self::A /*isMixinDeclaration*/ {
}
static method main() → dynamic {}

Some files were not shown because too many files have changed in this diff Show More