You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the class MultiplyDefinedElement2 doesn't appear to be implemented in the new element model. This makes it difficult to migrate code like that in https://dart-review.googlesource.com/c/sdk/+/387387 that inspects the conflictingElements.
Making MultiplyDefinedElementImplimplements MultiplyDefinedElement2 requires an implementation of Fragment firstFragment and List<Element2> conflictingElements2.
@bwilkerson@scheglov it turns out, there is a MultiplyDefinedFragment class already defined in element2.dart, though it also has no implementations. I feel like this might be the right way to solve this, though I'm not sure what the implementation of MultiplyDefinedFragment looks like (for ex. does it have a conflictingFragments? what are nextFragment and previousFragment?).
For the case I'm migrating for now I'm going to drop this, but since there's other code using MultiplyDefinedElement this probably needs solving before the migration is complete.
The text was updated successfully, but these errors were encountered:
DanTup
added
the
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
label
Nov 6, 2024
I think MultiplyDefinedFragment should be synthetic, without any next / previous fragments. The fragments of the conflicting elements are not fragments of the MultiplyDefinedElement2. It has a fragment at all just because it has to, but there is nothing useful in it.
Currently the class
MultiplyDefinedElement2
doesn't appear to be implemented in the new element model. This makes it difficult to migrate code like that in https://dart-review.googlesource.com/c/sdk/+/387387 that inspects theconflictingElements
.Making
MultiplyDefinedElementImpl
implements MultiplyDefinedElement2
requires an implementation ofFragment firstFragment
andList<Element2> conflictingElements2
.@bwilkerson @scheglov it turns out, there is a
MultiplyDefinedFragment
class already defined inelement2.dart
, though it also has no implementations. I feel like this might be the right way to solve this, though I'm not sure what the implementation ofMultiplyDefinedFragment
looks like (for ex. does it have aconflictingFragments
? what are nextFragment and previousFragment?).For the case I'm migrating for now I'm going to drop this, but since there's other code using
MultiplyDefinedElement
this probably needs solving before the migration is complete.The text was updated successfully, but these errors were encountered: