-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.Used for miscellaneous pkg/ packages not associated with specific area- teams.feature-macrosImplementation of the macros featureImplementation of the macros featurepkg-macrosThe experimental package:_macros libraryThe experimental package:_macros librarytype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Currently using Code in an interpolated String will result in Instance of.. . In the context of macros, a more sensible option would be to override Code.toString() so string interpolatation returns a string that represents the actual code.
Use case:
Using strings is more readable than arrays in some cases. I wanted to do
RawCode.fromString('$valueReference.toIso8601String()')
but had to do:
RawCode.fromParts([valueReference, '.toIso8601String()']);
In place like here https://github.com/dart-lang/sdk/pull/57063/files#diff-e10def922b15028782e7fdcf395c5acab6f0cc2e86c1696a3e936eb775396d7aR638
Metadata
Metadata
Assignees
Labels
area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.Used for miscellaneous pkg/ packages not associated with specific area- teams.feature-macrosImplementation of the macros featureImplementation of the macros featurepkg-macrosThe experimental package:_macros libraryThe experimental package:_macros librarytype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Type
Projects
Status
Done