Can someone explain this error and why this works with closure?
If you change 'Test' to 'A' inside 'B' class everything works in both cases.
beta 7
protocol Test {
func someFunc() -> String
var someClosure: () -> Int { get }
}
class A: Test {
func someFunc() -> String {
return "A String"
}
var someClosure: () -> Int {
return {
return 2
}
}
}
class B {
let a: Test
let aString: () -> String
let aInt: () -> Int
init(a: Test){
self.a = a
aString = a.someFunc // Error: Partial application of protocol method is not allowed
aInt = a.someClosure // Works fine
}
}
UPDATE
Also here is my weird segmentation fault collection https://gist.github.com/aleksgapp/795a2d428008bdfa4823
Do not hesitate to comment if you have some thoughts about any.