Files
sdk/tests/language/metadata/constructor_new_test.dart
T
Johnni Winther dd3fbffac7 [cfe,analyzer] Support new as identifier in metadata
The parser didn't support 'new' as identifier in this context.

The CL also adds the reporting of tear-offs as metadata for the CFE.
This was already handled by the analyzer.

Change-Id: I7ab5868fa83e5f216d0e7be7ae9cec4a2c865e80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364480
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2024-04-26 14:00:04 +00:00

22 lines
507 B
Dart

// Copyright (c) 2024, 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.
import 'constructor_new_test.dart' as self;
class Class {
const Class();
}
class GenericClass<X, Y> {
const GenericClass();
}
@Class.new()
@GenericClass.new()
@GenericClass<int, String>.new()
@self.Class.new()
@self.GenericClass.new()
@self.GenericClass<int, String>.new()
main() {}