示例工程 50-app-store-testflight

50-app-store-testflight/Diagnostics/PathComponentInt.swift

swift · 0.2 KB

// 故意编译失败:appendingPathComponent 需要字符串,不是整数。
// 复现:swiftc -typecheck Diagnostics/PathComponentInt.swift
import Foundation
 
let url = URL(string: "https://xwrt.dev")!.appendingPathComponent(42)