8b2993568e
This CL adds a new --pedantic option to dartfix for applying all fixes marked as pedantic. In addition, this addresses comments in https://dart-review.googlesource.com/c/sdk/+/111840 Change-Id: Ia2e7a792911f19edb698c126c8fd77cd8f8f77cc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111981 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Dan Rubel <danrubel@google.com>
26 lines
885 B
Dart
26 lines
885 B
Dart
// Copyright (c) 2019, 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.
|
|
|
|
// This file contains code that is modified by running dartfix.
|
|
// After running dartfix, this content matches a file in the "fixed" directory.
|
|
|
|
// Dart will automatically convert int literals to doubles.
|
|
// Running dartfix converts this double literal to an int
|
|
// if --double-to-int is specified on the command line.
|
|
const double myDouble = 4.0;
|
|
|
|
// This class is used as a mixin but does not use the new mixin syntax.
|
|
// Running dartfix converts this class to use the new syntax.
|
|
class MyMixin {
|
|
final someValue = myDouble;
|
|
}
|
|
|
|
class MyClass with MyMixin {}
|
|
|
|
main(List<String> args) {
|
|
if (args.length == 0) {
|
|
print('myDouble = ${MyClass().someValue}');
|
|
}
|
|
}
|