mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:43:57 +00:00
analyzer: Include the error code type in the unique name
Failing analyzer test cases which should reference an error code with a shared code might print: Expected but did not find: CompileTimeErrorCode.UNDEFINED_SETTER [58, 3] Found but did not expect: UNDEFINED_SETTER_ON_FUNCTION_TYPE [58, 3, The setter 'foo' isn't defined for the aliased function type.] To accept the current state, expect: error(UNDEFINED_SETTER_ON_FUNCTION_TYPE, 58, 3), which is erroneous; `CompileTimeErrorCode.` is needed as well. Change-Id: Ic44c38dfcd6e6158cf51d2ce9162567a0f8c0006 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213400 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
parent
76ac2ee172
commit
903e906a35
|
@ -15108,7 +15108,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
isUnresolvedIdentifier: isUnresolvedIdentifier,
|
||||
message: message,
|
||||
name: name,
|
||||
uniqueName: uniqueName ?? 'CompileTimeErrorCode.$name',
|
||||
uniqueName: 'CompileTimeErrorCode.${uniqueName ?? name}',
|
||||
);
|
||||
|
||||
@override
|
||||
|
@ -15539,7 +15539,7 @@ class StaticWarningCode extends AnalyzerErrorCode {
|
|||
isUnresolvedIdentifier: isUnresolvedIdentifier,
|
||||
message: message,
|
||||
name: name,
|
||||
uniqueName: uniqueName ?? 'StaticWarningCode.$name',
|
||||
uniqueName: 'StaticWarningCode.${uniqueName ?? name}',
|
||||
);
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue