Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit c89ecc7

Browse files
committed
++
1 parent 006fcfe commit c89ecc7

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

test/rules/unnecessary_overrides_test.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ class B extends A {
5757
''');
5858
}
5959

60+
test_method_ok_expressionStatement_commentsInBody() async {
61+
await assertNoDiagnostics(r'''
62+
class A {
63+
void a() { }
64+
}
65+
66+
class B extends A {
67+
@override
68+
void a() =>
69+
// There's something we want to document here.
70+
super.a();
71+
}
72+
''');
73+
}
74+
6075
test_method_ok_returnExpression_commentsInBody() async {
6176
await assertNoDiagnostics(r'''
6277
class A {

test_data/rules/unnecessary_overrides.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class Parent extends Base {
3333
int get x => super.x; // LINT
3434

3535
@override
36-
set x(other) { // LINT
36+
set x(other) // LINT
37+
{
3738
super.x = other;
3839
}
3940

@@ -101,7 +102,8 @@ class A {
101102

102103
class B extends A {
103104
@override
104-
void foo() { // LINT
105+
void foo() // LINT
106+
{
105107
super.foo();
106108
}
107109

@@ -114,7 +116,8 @@ class B extends A {
114116
int getA(Iterable a) => super.getA(a); // LINT
115117

116118
@override
117-
int getB(Iterable a) { // LINT
119+
int getB(Iterable a) // LINT
120+
{
118121
return super.getB(a);
119122
}
120123

0 commit comments

Comments
 (0)