blob: 7cadc710cb19003e82e9fef8d867cca76bbcd6c2 [file] [log] [blame] [edit]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:29:12: Error: A class member can't have the same name as the enclosing class.
// Try renaming the member.
// void set Class(value) {}
// ^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'.
// void set topLevelMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'.
// topLevelMethodAndSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'.
// void set topLevelMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'.
// topLevelMethodAndSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: 'topLevelMethodAndSetter' is already declared in this scope.
// void set topLevelMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Context: Previous declaration of 'topLevelMethodAndSetter'.
// void set topLevelMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: The setter conflicts with declaration 'classAndSetter'.
// void set classAndSetter(value) {}
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Context: Conflicting declaration 'classAndSetter'.
// class classAndSetter {}
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter'.
// void set instanceMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Conflicting declaration 'instanceMethodAndSetter'.
// instanceMethodAndSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: The setter conflicts with declaration 'staticMethodAndSetter'.
// static void set staticMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Conflicting declaration 'staticMethodAndSetter'.
// static staticMethodAndSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: The setter conflicts with declaration 'instanceMethodAndStaticSetter'.
// static void set instanceMethodAndStaticSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:22:3: Context: Conflicting declaration 'instanceMethodAndStaticSetter'.
// instanceMethodAndStaticSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:26:12: Error: The setter conflicts with declaration 'staticMethodAndInstanceSetter'.
// void set staticMethodAndInstanceSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:25:10: Context: Conflicting declaration 'staticMethodAndInstanceSetter'.
// static staticMethodAndInstanceSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: The setter conflicts with declaration 'extensionInstanceMethodAndSetter'.
// void set extensionInstanceMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Context: Conflicting declaration 'extensionInstanceMethodAndSetter'.
// extensionInstanceMethodAndSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: The setter conflicts with declaration 'extensionStaticMethodAndSetter'.
// static void set extensionStaticMethodAndSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Context: Conflicting declaration 'extensionStaticMethodAndSetter'.
// static extensionStaticMethodAndSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: The setter conflicts with declaration 'extensionInstanceMethodAndStaticSetter'.
// static void set extensionInstanceMethodAndStaticSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Context: Conflicting declaration 'extensionInstanceMethodAndStaticSetter'.
// extensionInstanceMethodAndStaticSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: The setter conflicts with declaration 'extensionStaticMethodAndInstanceSetter'.
// void set extensionStaticMethodAndInstanceSetter(value) {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Context: Conflicting declaration 'extensionStaticMethodAndInstanceSetter'.
// static extensionStaticMethodAndInstanceSetter() {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
typedef typedefAndSetter = () dynamic;
class classAndSetter extends core::Object {
synthetic constructor •() self::classAndSetter
;
}
class Class extends core::Object {
constructor •() self::Class
;
method instanceMethodAndSetter() dynamic
;
static method staticMethodAndSetter() dynamic
;
method instanceMethodAndStaticSetter() dynamic
;
static method staticMethodAndInstanceSetter() dynamic
;
set Class(dynamic value) void
;
}
extension Extension on core::int? {
method extensionInstanceMethodAndSetter = self::Extension|extensionInstanceMethodAndSetter;
method tearoff extensionInstanceMethodAndSetter = self::Extension|get#extensionInstanceMethodAndSetter;
static method extensionStaticMethodAndSetter = self::Extension|extensionStaticMethodAndSetter;
method extensionInstanceMethodAndStaticSetter = self::Extension|extensionInstanceMethodAndStaticSetter;
method tearoff extensionInstanceMethodAndStaticSetter = self::Extension|get#extensionInstanceMethodAndStaticSetter;
static method extensionStaticMethodAndInstanceSetter = self::Extension|extensionStaticMethodAndInstanceSetter;
}
static method topLevelMethodAndSetter() dynamic
;
static extension-member method Extension|extensionInstanceMethodAndSetter(lowered final core::int? #this) → dynamic
;
static extension-member method Extension|get#extensionInstanceMethodAndSetter(lowered final core::int? #this) → () → dynamic
return () dynamic => self::Extension|extensionInstanceMethodAndSetter(#this);
static extension-member method Extension|extensionStaticMethodAndSetter() dynamic
;
static extension-member method Extension|extensionInstanceMethodAndStaticSetter(lowered final core::int? #this) → dynamic
;
static extension-member method Extension|get#extensionInstanceMethodAndStaticSetter(lowered final core::int? #this) → () → dynamic
return () dynamic => self::Extension|extensionInstanceMethodAndStaticSetter(#this);
static extension-member method Extension|extensionStaticMethodAndInstanceSetter() dynamic
;
static method test() dynamic
;
static method main() dynamic
;