[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:
David Morgan 2024-01-18 09:02:52 +00:00 committed by Commit Queue
parent 4266f780bd
commit b28ced8e93

View 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.