-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macros] support for avoid_unused_constructor_parameters
#4934
Comments
avoid_unused_constructor_parameters
avoid_unused_constructor_parameters
Fixes: dart-lang/linter#4934 Change-Id: Iafd6ed199bf69214b6520dd56c5bd0012e029341 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363104 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
The above is now supported w/ dart-lang/sdk@4e3ff1d. The following case is interesting though (thanks @bwilkerson!) test_augmentedConstructor_base() async {
newFile('$testPackageLibPath/a.dart', r'''
augment library 'test.dart';
augment class A {
final int y;
augment A(int x) : y = x;
}
''');
await assertNoDiagnostics(r'''
import augment 'a.dart';
class A {
A(int x);
}
''');
} The rub is that To get this test to pass though, we'd need to visit the ASTs of the augmentations in (Note that we'll need to do similar things when evaluating if a field could be /fyi @scheglov |
Example:
The text was updated successfully, but these errors were encountered: