示例工程 43-coredata-migration
43-coredata-migration/Diagnostics/README.md
# Diagnostics
三个文件**故意编译失败**,用来复现第 43 章「报错现场」的真实诊断。
```bash
swiftc -typecheck Diagnostics/NSManagedOnStruct.swift # error: '@NSManaged' only allowed on an instance property
swiftc -typecheck Diagnostics/NSManagedLet.swift # error: '@NSManaged' not allowed on a 'let' property
swiftc -typecheck Diagnostics/AttributeTypeString.swift # error: cannot assign 'String' to 'NSAttributeType'
```