Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: test/rules/final_override_non_final.dart

Issue 1870423002: Lint rule: Do not override fields. Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: Hint field override Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // test w/ `dart test/util/solo_test.dart final_override_non_final`
6
7 class Base {
8 Object field = 'lorem';
9
10 Object something = 'change';
11 }
12
13 class Bad1 extends Base {
14 @override
15 final field = 'ipsum'; // LINT
16 }
17
18 class Bad2 extends Base {
19 @override
20 Object something = 'done'; // LINT
21 }
22
23 class Ok extends Base {
24 Object newField; // OK
25
26 final Object newFinal = 'ignore'; // OK
27 }
OLDNEW
« lib/src/rules/final_override_non_final.dart ('K') | « lib/src/rules/final_override_non_final.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698