File tree 4 files changed +19
-7
lines changed
4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 3
3
- Return empty library from ` ChromeProxyService.getObject ` for
4
4
libraries present in medatata but not lodaded at runtime.
5
5
- Log failures to load kernel during expression evaluation.
6
+ - Show lowered final fields using their original dart names.
6
7
7
8
## 11.1.1
8
9
Original file line number Diff line number Diff line change @@ -299,11 +299,17 @@ class InstanceHelper extends Domain {
299
299
return fields.join(',');
300
300
}
301
301
const privateFields = sdk_utils.getOwnPropertySymbols(fields);
302
- const nonSymbolNames = privateFields.map(sym => sym.description);
302
+ const nonSymbolNames = privateFields
303
+ .map(sym => sym.description
304
+ .split('#').slice(-1)[0]);
303
305
const publicFieldNames = sdk_utils.getOwnPropertyNames(fields);
304
306
const symbolNames = Object.getOwnPropertySymbols(this)
305
- .map(sym => sym.description.split('.').slice(-1)[0]);
306
- return nonSymbolNames.concat(publicFieldNames).concat(symbolNames).join(',');
307
+ .map(sym => sym.description
308
+ .split('#').slice(-1)[0]
309
+ .split('.').slice(-1)[0]);
310
+ return nonSymbolNames
311
+ .concat(publicFieldNames)
312
+ .concat(symbolNames).join(',');
307
313
}
308
314
''' ;
309
315
var allNames = (await inspector
Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ class Property {
45
45
var nonSymbol = (rawName.startsWith (prefix))
46
46
? rawName.substring (prefix.length, rawName.length - 1 )
47
47
: rawName;
48
+ // Adjust names for late fields:
49
+ // '_#MyTestClass#myselfField' -> 'myselfField'
50
+ // TODO(annagrin): Use debug symbols to map from dart to JS symbols.
51
+ // https://github.com/dart-lang/sdk/issues/40273
52
+ nonSymbol = nonSymbol.split ('#' ).last;
48
53
return nonSymbol.split ('.' ).last;
49
54
}
50
55
Original file line number Diff line number Diff line change @@ -137,16 +137,16 @@ Function? someFunction() => null;
137
137
// ignore: unused_element
138
138
int _libraryPrivateFunction (int a, int b) => a + b;
139
139
140
- class NotReallyAList extends ListBase <Object > {
141
- final List <Object > _internal;
140
+ class NotReallyAList extends ListBase <Object ? > {
141
+ final List <Object ? > _internal;
142
142
143
143
NotReallyAList () : _internal = [];
144
144
145
145
@override
146
- Object operator [](x) => _internal[x];
146
+ Object ? operator [](x) => _internal[x];
147
147
148
148
@override
149
- operator []= (int x, Object y) => _internal[x] = y;
149
+ operator []= (int x, Object ? y) => _internal[x] = y;
150
150
151
151
@override
152
152
int get length => _internal.length;
You can’t perform that action at this time.
0 commit comments