[tests] Fix and move erroneous constructor tearoff dot shorthands test.

Pretty sure this isn't valid code. Moving to an error test.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I58fc9cc00286bfae2b6093cfb5ac2c215baf344d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414187
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
This commit is contained in:
Kallen Tu
2025-03-07 09:35:35 -08:00
committed by Commit Queue
parent 2e238e92d9
commit a81828a66d
2 changed files with 5 additions and 2 deletions
@@ -42,4 +42,9 @@ void main() {
// ^
// [analyzer] unspecified
// [cfe] unspecified
UnnamedConstructor Function() ctorTearoff = .new;
// ^
// [analyzer] unspecified
// [cfe] unspecified
}
@@ -57,8 +57,6 @@ void main() {
ConstructorExt? ctorExtNullable5 = .constNamed(x: x);
ConstructorExt? ctorExtNullable6 = .constOptional(x);
UnnamedConstructor Function() ctorTearoff = .new;
// Parameter context type.
ConstructorClassContext(.new(1));
ConstructorClassContext.named(x: .optional(1));