Purpose
Define a consistent syntax and resolution rule for quoted typed literals: #"representation":type. When the suffix is omitted, infer the type using registered literal parsers.
This issue focuses on literal parsing, resolution, diagnostics, and serialization. Runtime library loading, extension API compatibility, operator registration, coercion extensibility, and collection semantics are outside its scope.
Explicit type suffix
Support built-in types through the same syntax:
#"2025-12-16":date
#"2025-12-16T14:30:00":datetime
#"14:30:00":time
#"P2D":duration
For example, #94 will use #"1.25.0+abc":semver once that type is available. Implementing SemVer is not an acceptance criterion for this issue.
Inference without a suffix
For #"representation", try the registered literal parsers:
Adding a registered parser may make an unsuffixed literal ambiguous; document the explicit suffix as the remedy.
Serialization and failure behavior
Validation
Purpose
Define a consistent syntax and resolution rule for quoted typed literals:
#"representation":type. When the suffix is omitted, infer the type using registered literal parsers.This issue focuses on literal parsing, resolution, diagnostics, and serialization. Runtime library loading, extension API compatibility, operator registration, coercion extensibility, and collection semantics are outside its scope.
Explicit type suffix
Support built-in types through the same syntax:
:typesuffix.For example, #94 will use
#"1.25.0+abc":semveronce that type is available. Implementing SemVer is not an acceptance criterion for this issue.Inference without a suffix
For
#"representation", try the registered literal parsers:Adding a registered parser may make an unsuffixed literal ambiguous; document the explicit suffix as the remedy.
Serialization and failure behavior
#"representation":typeas canonical serialization for quoted typed literals.Validation