Error when using Generic as property type in Swift

前端 未结 3 1360
清歌不尽
清歌不尽 2021-01-05 17:46

I\'m having an issue when using a Generic as the type constraint on a property. Here is a very simple example:

import UIKit

class TSSignal

        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-05 18:27

    This is NOT an "answer" (it is my own question), but I thought it worth noting what I did in this case to move passed this situation, for the time being.

    import UIKit
    class TSSignal {
        var message: AnyObject?
        init() {
        }
    }
    

    Lame, but I am sure it's only temporary.

提交回复
热议问题