DO NOT SUMBIT: Question: is this a better way to get at enum values via pkg:analyzer? - #225
DO NOT SUMBIT: Question: is this a better way to get at enum values via pkg:analyzer?#225kevmoo wants to merge 1 commit into
Conversation
|
Neither solution is great, but there isn't anything better that I can think of. The element model doesn't differentiate between classes and enums, so there isn't any nice way to get all of the enum constants. When analyzer moves to the CFE we might not be able to move as easily from the element model back to the AST, so the current code might be slightly better in terms of future-proofing. One alternative I can think of would be to ask for |
|
Thanks, @bwilkerson – opened #227 Would love comments on the other issues I opened. |
@scheglov @bwilkerson as you can likely tell be recent issues ( dart-lang/sdk#33373 dart-lang/sdk#33375 ) I'm looking at some code that details with enums.
Look at the diff here. Both before and after have their own code smell – is one preferred? Is there something I'm missing?
Thanks!