# Diagnostics 三个文件**故意编译失败**,用来复现第 34 章「报错现场」的真实诊断。 ```bash swiftc -typecheck Diagnostics/ConstructGraphicsContext.swift # error: no accessible initializers swiftc -typecheck Diagnostics/ShadingNotColor.swift # error: 'Shading' has no member 'red' swiftc -typecheck Diagnostics/LineWidthString.swift # error: cannot convert 'String' to 'CGFloat' ```