built_in_identifier_in_declaration
The built-in identifier '{0}' can't be used as a prefix name.
The built-in identifier '{0}' can't be used as a type name.
The built-in identifier '{0}' can't be used as a type parameter name.
The built-in identifier '{0}' can't be used as a typedef name.
The built-in identifier '{0}' can't be used as an extension name.
The built-in identifier '{0}' can't be used as an extension type name.
Description
#The analyzer produces this diagnostic when the name used in the declaration of a class, extension, mixin, typedef, type parameter, or import prefix is a built-in identifier. Built-in identifiers can't be used to name any of these kinds of declarations.
Example
#The following code produces this diagnostic because mixin
is a built-in
identifier:
extension mixin on int {}
Common fixes
#除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。