示例工程 52-app-performance-instruments

52-app-performance-instruments/Diagnostics/DurationSeconds.swift

swift · 0.2 KB

// 故意编译失败:Duration 没有实例属性 seconds。
// 复现:swiftc -typecheck Diagnostics/DurationSeconds.swift
import Foundation
 
let duration = Duration.seconds(1)
let seconds = duration.seconds