Wrong name used to access the index field of enumeration constants #2318
Labels
P2
A bug or feature request we're likely to work on
type-code-health
Internal changes to our tools and workflows to make them cleaner, simpler, or more maintainable
In at least one place:
this package is assuming that every enumeration constant has a field whose name is the same as the name of the constant and whose value is the index of the constant. That isn't true; the field is named
index
. We need to fix the analyzer to stop producing a representation of such a field, but we can't do so until this package stops depending on the existence of that field.The easiest way to test that all such locations have been fixed might be to update the version of
analyzer
being used bydartdoc
to stop producing the invalid field. The code that produces the field is, as of this writing, atpkg/analyzer/lib/src/dart/element/element.dart:1778
.The text was updated successfully, but these errors were encountered: