Dart Analyze logoDart Analyze/
DRT-W1246

Invalid use of built-in identifier as a typeDRT-W1246

Major severityMajor
Bug Risk categoryBug Risk

The analyzer produces this diagnostic when a built-in identifier is used where a type name is expected.

Example

The following code produces this diagnostic because import can't be used as a type because it's a built-in identifier:

import<int> x;

Common fixes

Replace the built-in identifier with the name of a valid type:

List<int> x;