extension_type_representation_type_bottom
Details about the 'extension_type_representation_type_bottom' diagnostic produced by the Dart analyzer.
The representation type can't be a bottom type.
Description
#
The analyzer produces this diagnostic when the representation type of an
extension type is the bottom type
Never. The type Never can't be
the representation type of an extension type because there are no values
that can be extended.
Example
#
The following code produces this diagnostic because the representation
type of the extension type E is Never:
extension type E(Never n) {}
Common fixes
#Replace the extension type with a different type:
extension type E(String s) {}
除非另有说明,文档之所提及适用于 Dart 3.10.3 版本报告页面问题.