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
@bwilkerson while fixing #4184 I noticed these edit groups being produced:
Sep-28-2022.16-24-21.mp4
Here, we're creating linked edit groups with suggestions for Object? and Object where it seems like only Object? is allowed. I believe it's because of withNullability: false here:
However, in the case where there are additional supertypes, that only includes the suffix on the original type. So I think we need to capture the suffix for the original type, and just manually append that onto the result of getDisplayString(withNullability: false) for each result.
Before I do this, a) do you know if there are any cases where the current behaviour is expected (or the described behaviour above would be worse), or whether there's something existing that's cleaner than manipulating strings here to get type.superclass where the result has the nullability suffix propagated?
(I'm also not entirely sure we should be adding tabstops on these types/param names.. you can tab through them, but not the bodies of the inserted methods... but that's another issue).
@bwilkerson while fixing #4184 I noticed these edit groups being produced:
Sep-28-2022.16-24-21.mp4
Here, we're creating linked edit groups with suggestions for
Object?andObjectwhere it seems like onlyObject?is allowed. I believe it's because ofwithNullability: falsehere:https://github.com/dart-lang/sdk/blob/e08c94a65147aaa3ec8c4e09fd1935f20599eec2/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart#L1936
I think perhaps it should be more like:
However, in the case where there are additional supertypes, that only includes the suffix on the original type. So I think we need to capture the suffix for the original type, and just manually append that onto the result of
getDisplayString(withNullability: false)for each result.Before I do this, a) do you know if there are any cases where the current behaviour is expected (or the described behaviour above would be worse), or whether there's something existing that's cleaner than manipulating strings here to get
type.superclasswhere the result has the nullability suffix propagated?(I'm also not entirely sure we should be adding tabstops on these types/param names.. you can tab through them, but not the bodies of the inserted methods... but that's another issue).