File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
pkg/analysis_server/lib/src/services/completion/token_details Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ class TokenDetailBuilder {
115
115
} else if (type is InterfaceType ) {
116
116
Element element = type.element;
117
117
if (element == null || element.isSynthetic) {
118
+ assert (false , "untested branch may print nullable types wrong" );
119
+ // TODO: test this, use the the library's nullability (not tracked yet).
118
120
buffer.write (type.getDisplayString (withNullability: false ));
119
121
} else {
120
122
// String uri = element.library.source.uri.toString();
@@ -132,7 +134,9 @@ class TokenDetailBuilder {
132
134
}
133
135
}
134
136
} else {
135
- // Handle `void` and `dynamic`.
137
+ // Handle `void` and `dynamic`. Nullability doesn't affect this.
138
+ assert (type.getDisplayString (withNullability: false ) ==
139
+ type.getDisplayString (withNullability: true ));
136
140
buffer.write (type.getDisplayString (withNullability: false ));
137
141
}
138
142
}
You can’t perform that action at this time.
0 commit comments