Swift compiler segmentation fault when building

后端 未结 30 2671
南旧
南旧 2020-11-29 03:59

Adding a (convenient) computed height property to UIView in my UIViewExtension.swift file is causing the Swift compiler to segfault...

30条回答
  •  伪装坚强ぢ
    2020-11-29 05:01

    I’ve discovered a simple workaround until the problem is fixed in a future Xcode/Swift build:

    • Simply place all extensions causing the issue in the .swift file that it’s being used.

    In the example project you provided, place the contents of UIViewExtension.swift and CALayerExtension.swift above AppDelegate.swift

    Hopefully this can get us to write working Swift code until the problem’s cleared up.

提交回复
热议问题