blob: 08d2dc1a0e9a0159368c612885fac0c1055c78d0 [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/ `pub run 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;
}