dart-sdk/pkg/front_end/testcases/records/type_record_as_supertype.dart.weak.transformed.expect
Johnni Winther e1233c3ccc [cfe] Replace line/column with *
The updates the expectation tests to use * instead of line/column number
for sdk messages.

Change-Id: I882abe6e3b1d88238d87a71d655ca9807869592c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347901
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-01-23 15:34:39 +00:00

186 lines
8.2 KiB
Plaintext

library;
//
// Problems in library:
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented.
// abstract class A1 extends Record {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:11:27: Error: The class 'Record' can't be extended outside of its library because it's a final class.
// abstract class A1 extends Record {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:13:16: Error: 'Record' is restricted and can't be extended or implemented.
// abstract class A2 extends RR {} // Error.
// ^
// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
// typedef RR = R;
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:13:27: Error: The class 'Record' can't be extended outside of its library because it's a final class.
// abstract class A2 extends RR {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:19:16: Error: 'Record' is restricted and can't be extended or implemented.
// abstract class B1 implements Record {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:19:30: Error: The class 'Record' can't be implemented outside of its library because it's a final class.
// abstract class B1 implements Record {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented.
// abstract class B2 implements RR {} // Error.
// ^
// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
// typedef RR = R;
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:21:30: Error: The class 'Record' can't be implemented outside of its library because it's a final class.
// abstract class B2 implements RR {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:27:16: Error: 'Record' is restricted and can't be extended or implemented.
// abstract class C1 with Record {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:27:24: Error: The class 'Record' can't be used as a mixin because it isn't a mixin class nor a mixin.
// abstract class C1 with Record {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:27:16: Error: The type 'C1' must be 'base', 'final' or 'sealed' because the supertype 'Record' is 'final'.
// Try adding 'base', 'final', or 'sealed' to the type.
// abstract class C1 with Record {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:29:16: Error: 'Record' is restricted and can't be extended or implemented.
// abstract class C2 with RR {} // Error.
// ^
// pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias.
// typedef RR = R;
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:29:16: Error: 'RR' is restricted and can't be extended or implemented.
// abstract class C2 with RR {} // Error.
// ^
// sdk/lib/core/record.dart:*: Context: This is the type denoted by the type alias.
// abstract final class Record {
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:29:24: Error: The class 'Record' can't be used as a mixin because it isn't a mixin class nor a mixin.
// abstract class C2 with RR {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:29:16: Error: The type 'C2' must be 'base', 'final' or 'sealed' because the supertype 'Record' is 'final'.
// Try adding 'base', 'final', or 'sealed' to the type.
// abstract class C2 with RR {} // Error.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:31:24: Error: The class 'G' can't be used as a mixin because it isn't a mixin class nor a mixin.
// abstract class C3 with G<Record> {} // Ok.
// ^
//
// pkg/front_end/testcases/records/type_record_as_supertype.dart:33:24: Error: The class 'G' can't be used as a mixin because it isn't a mixin class nor a mixin.
// abstract class C4 with G<RR> {} // Ok.
// ^
//
import self as self;
import "dart:core" as core;
typedef R = core::Record;
typedef RR = core::Record;
class G<X extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() → self::G<self::G::X%>
: super core::Object::•()
;
}
abstract class A1 extends core::Record {
synthetic constructor •() → self::A1
: super core::Record::•()
;
}
abstract class A2 extends core::Record {
synthetic constructor •() → self::A2
: super core::Record::•()
;
}
abstract class A3 extends self::G<core::Record> {
synthetic constructor •() → self::A3
: super self::G::•()
;
}
abstract class A4 extends self::G<core::Record> {
synthetic constructor •() → self::A4
: super self::G::•()
;
}
abstract class B1 extends core::Object implements core::Record {
synthetic constructor •() → self::B1
: super core::Object::•()
;
}
abstract class B2 extends core::Object implements core::Record {
synthetic constructor •() → self::B2
: super core::Object::•()
;
}
abstract class B3 extends core::Object implements self::G<core::Record> {
synthetic constructor •() → self::B3
: super core::Object::•()
;
}
abstract class B4 extends core::Object implements self::G<core::Record> {
synthetic constructor •() → self::B4
: super core::Object::•()
;
}
abstract final class _C1&Object&Record extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
const synthetic constructor •() → self::_C1&Object&Record
: super core::Object::•()
;
abstract get /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ runtimeType() → core::Type;
abstract get /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ hashCode() → core::int;
abstract operator /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ ==(core::Object other) → core::bool;
abstract method /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ toString() → core::String;
}
abstract class C1 extends self::_C1&Object&Record {
synthetic constructor •() → self::C1
: super self::_C1&Object&Record::•()
;
}
abstract final class _C2&Object&RR extends core::Object implements core::Record /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
const synthetic constructor •() → self::_C2&Object&RR
: super core::Object::•()
;
abstract get /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ runtimeType() → core::Type;
abstract get /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ hashCode() → core::int;
abstract operator /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ ==(core::Object other) → core::bool;
abstract method /* from org-dartlang-sdk:///sdk/lib/core/record.dart */ toString() → core::String;
}
abstract class C2 extends self::_C2&Object&RR {
synthetic constructor •() → self::C2
: super self::_C2&Object&RR::•()
;
}
abstract class _C3&Object&G extends core::Object implements self::G<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
const synthetic constructor •() → self::_C3&Object&G
: super core::Object::•()
;
}
abstract class C3 extends self::_C3&Object&G {
synthetic constructor •() → self::C3
: super self::_C3&Object&G::•()
;
}
abstract class _C4&Object&G extends core::Object implements self::G<core::Record> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ {
const synthetic constructor •() → self::_C4&Object&G
: super core::Object::•()
;
}
abstract class C4 extends self::_C4&Object&G {
synthetic constructor •() → self::C4
: super self::_C4&Object&G::•()
;
}
static method main() → dynamic {}