-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlanguage-nonfunction-type-aliasesIssues related to non-function type aliasesIssues related to non-function type aliaseslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.
Milestone
Description
Dart SDK version: 2.13.0-165.0.dev (dev) (Thu Mar 25 02:53:52 2021 -0700) on "windows_x64"
Here is a source code example which demonstrates the problem:
abstract class I {}
abstract class J {}
typedef IAlias = I;
class A implements I, J, IAlias {}
main() {}Dart throws a compile error whereas analyzer silently passes here.
It is a compile-time error if the implements clause of a class C specifies a type T as a superinterface more than once, so seems like analyzer should throw an exception too.
Sample output is:
$> dartanalyzer --enable-experiment=nonfunction-type-aliases test.dart
Analyzing test.dart...
No issues found!
$> dart --enable-experiment=nonfunction-type-aliases test.dart
test.dart: Error: 'I' can only be implemented once.
Try removing 1 of the occurrences.
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlanguage-nonfunction-type-aliasesIssues related to non-function type aliasesIssues related to non-function type aliaseslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.