mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:35:46 +00:00
[macros] Add language test: applying a macro in the wrong place is an error.
Change-Id: Iebdc005d792ac2e2fca912f792d3caf16810bb32 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346044 Reviewed-by: Jake Macdonald <jakemac@google.com> Commit-Queue: Morgan :) <davidmorgan@google.com>
This commit is contained in:
parent
4266f780bd
commit
b28ced8e93
14
tests/language/macros/error/apply_in_wrong_place_test.dart
Normal file
14
tests/language/macros/error/apply_in_wrong_place_test.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// 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.
|
||||
// SharedOptions=--enable-experiment=macros
|
||||
|
||||
@ClassTypesDeclareType(name: '', code: '')
|
||||
// [error line 6, column 1]
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
library;
|
||||
|
||||
import '../augment/impl/class_types_macro.dart';
|
||||
|
||||
// TODO(davidmorgan): cover all macro types and places.
|
Loading…
Reference in a new issue