CodeSampleX

示例

Ensure option-like arguments and the double-dash separator after a positional argument are treated as literal positional arguments when allowTrailingOptions is disabled

sha256:a8903858356386356972e088af4cc88ca064369aeb6c21d7e9db1fade9205dad

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Ensure option-like arguments and the double-dash separator after a positional argument are treated as literal positional arguments when allowTrailingOptions is disabled HOW
args 2.7.0
环境
dart
创建时间
2026-08-17T02:02:58Z

常见的想当然

When allowTrailingOptions is false, option-like arguments after the first positional argument still trigger validation, and the double-dash separator is consumed as a special token.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执