被一个父类获取子类属性的方法搞伤心了,求指导
父类 A 有个方法 match(another a: A) 参数是A的实例
子类B继承A,添加新的属性bb,并且覆盖A的match方法,match(another a: A)
match方法中用到 a.bb 提示 'A' does not have a menber named 'bb'
查了官方文档继承和覆盖章节,没找到答案,求资深swifter指导
父类 A 有个方法 match(another a: A) 参数是A的实例
子类B继承A,添加新的属性bb,并且覆盖A的match方法,match(another a: A)
match方法中用到 a.bb 提示 'A' does not have a menber named 'bb'
查了官方文档继承和覆盖章节,没找到答案,求资深swifter指导