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
{{ message }}
Repository navigation
[record_use] Completeness: record consts (record record consts) #3054
import'package:meta/meta.dart'show RecordUse;
voidmain() {
// Records are valid keys in a constant map in Dart.print(SomeClass.someStaticMethod(const {
(1, 2):'positional-record-key',
('id', name:'gemini'):'mixed-record-key',
}));
}
classSomeClass {
@RecordUse()
staticStringsomeStaticMethod(Object? a) => a.runtimeType.toString();
}
(Side note we need to report them as unsupported in the meantime #2899)
Activity
dcharkes commentedon Feb 23, 2026
✦ In Kernel (the Dart intermediate representation used by the VM and CFE), record constants are represented by the RecordConstant class:
In dart2js, record constants are represented by the RecordConstantValue class:
shape.
We don't have a way to represent types in the recorded uses, so we'll not record the type, but we will record positional and named fields.
[record_use] Constant Record Values (#3137)
[record_use] Record record constants
Squashed commit of the following: