CodeSampleX

Sample

Handle the TypeError thrown by CanonicalizedMap.cast at runtime due to incorrect delegation to the raw base map.

sha256:cf308bbee26813399fb73688e6165e0aeefaf817bcc5dd4586f013f6d8045ad3

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Handle the TypeError thrown by CanonicalizedMap.cast at runtime due to incorrect delegation to the raw base map. HOW
Packages
collection 1.19.1
Environment
dart
Created
2026-08-17T02:04:15Z

Commonly assumed

Calling cast on a CanonicalizedMap returns a valid Map wrapper that soundly checks and casts its keys and values for runtime lookups and iterations.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts