swift - 在操场上使用日期时“执行被中断”。谁能解释一下?
问题描述
当我在 XCode-beta 11 的 Playground 中使用类型为 Date 的属性时,出现错误:“执行被中断”。(在 Xcode 10 中一切都很好)
Xcode 11.0 测试版 3 (11M362v)
import Foundation
class Singleton {
static let shared = Singleton()
private init() {}
let date = Date()
}
let singleton = Singleton.shared // Error here (when instance created)
print("DATE:", singleton.date)
解决方案
推荐阅读
- snowflake-cloud-data-platform - 如何将数据插入到雪花数据库的临时表中。我创建了一个 DDL:创建临时表 table_name 作为 Select
- mysql - 作为mysql SUM的结果添加字符串而不是结果0
- reactjs - 如何通过数组传递道具
- flutter - 有没有办法检查流/主题是否有错误?
- c# - 无效的 Intellisense 错误 CS0103 ASP.NET 网站“当前上下文中不存在该名称”
- django - 即使所需图表字段未明确设置,也会创建实例
- wolfram-mathematica - 在模块内使用 For 循环迭代排列时出现问题
- python - Django cron 运行多次,但不应该
- android - 当我按下停止按钮或搜索栏到达末尾时,此应用程序停止工作
- c# - 为什么我的 React 按钮只工作一次然后停止?