Closed
Description
In at least one place:
new ModelElement.fromPropertyInducingElement (package:dartdoc/src/model/model_element.dart:203:65)
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 by dartdoc
to stop producing the invalid field. The code that produces the field is, as of this writing, at pkg/analyzer/lib/src/dart/element/element.dart:1778
.