246050a1ef
The new formatter supports opting a region of code out from being formatted. I'm applying this marker to all of the multitests since those tests are often very sensitive to formatting and easily broken. This way, anyone touching a multitest (including me when I reformat the tests) doesn't have to remember to not run the formatter on it. Change-Id: I34831719cd35e669b49e02a0d00c32b44068a34e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396103 Commit-Queue: Lasse Nielsen <lrn@google.com> Reviewed-by: Lasse Nielsen <lrn@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com>
32 lines
714 B
Dart
32 lines
714 B
Dart
// Copyright (c) 2013, 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.
|
|
|
|
// Formatting can break multitests, so don't format them.
|
|
// dart format off
|
|
|
|
// Regression test for Issue 15744
|
|
// Also, tests that syntax errors in reflected classes are reported correctly.
|
|
|
|
library lib;
|
|
|
|
import 'dart:mirrors';
|
|
|
|
class MD {
|
|
final String name;
|
|
const MD({required this.name});
|
|
}
|
|
|
|
@MD(name: 'A')
|
|
class A {}
|
|
|
|
@MD(name: 'B')
|
|
class B {
|
|
static x = { 0: 0; }; // //# 01: compile-time error
|
|
}
|
|
|
|
main() {
|
|
reflectClass(A).metadata;
|
|
reflectClass(B).newInstance(Symbol.empty, []);
|
|
}
|