示例工程 37-animation

37-animation/Diagnostics/README.md

markdown · 0.5 KB

# Diagnostics
 
三个文件**故意编译失败**,用来复现第 37 章「报错现场」的真实诊断。
 
```bash
swiftc -typecheck Diagnostics/AnimationValueNotEquatable.swift # error: requires that 'NotEquatable' conform to 'Equatable'
swiftc -typecheck Diagnostics/SpringWrongLabel.swift           # error: incorrect argument label 'dampingFraction'
swiftc -typecheck Diagnostics/NamespaceMismatch.swift          # error: cannot convert 'String' to 'Namespace.ID'
```