blob: 7ba3fa063d4471e502fe42e43bee653e67c62270 [file] [log] [blame]
// Copyright (c) 2021, 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.
// test w/ `dart test -N avoid_multiple_declarations_per_line`
// ignore_for_file: unused_local_variable
String? badFoo, badBar, badBaz; // LINT
String? goodFoo;
String? goodBar;
String? goodBaz;
methodContainingBadDeclaration() {
String? badFoo, badBar, badBaz; // LINT
}
methodContainingGoodDeclaration() {
String? goodFoo;
String? goodBar;
String? goodBaz;
}
class BadClass {
String? foo, bar, baz; // LINT
methodContainingBadDeclaration() {
String? badFoo, badBar, badBaz; // LINT
}
}
class GoodClass {
String? foo;
String? bar;
String? baz;
methodContainingGoodDeclaration() {
String? goodFoo;
String? goodBar;
String? goodBaz;
}
}
extension BadExtension on Object {
static String? badFoo, badBar, badBaz; // LINT
}
extension GoodExtension on Object {
static String? foo;
static String? bar;
static String? baz;
}