Code above (with more view stacks being added) intermittently causes compiler to spits ambiguity error without clear direction to where the confusion occurs.
Sometimes, it can be resolved by switching the order of method call. Sure, it is very bad indeed. Because it hides the real problem and it will breaks soon. Once you change a code, it maybe won't compile again.
And also, the compiler seems to be confused and failed to interpret expression which normally will not happen. This is being investigated whether the source of problem is the lack of some keyword (because we can't use it) which results the abuse of protocol or the problem lies in the compiler itself.
Until the real fix shows up, we advice to use this function to configure SomeView instance. And yeah, this is the main source of @discardableResult attribute in all methods.
func configure
is just a simple helper where direct method call to the api's causes confusion to the Swift compiler.You may want to check it with
Code above (with more view stacks being added) intermittently causes compiler to spits ambiguity error without clear direction to where the confusion occurs.
Sometimes, it can be resolved by switching the order of method call. Sure, it is very bad indeed. Because it hides the real problem and it will breaks soon. Once you change a code, it maybe won't compile again.
And also, the compiler seems to be confused and failed to interpret expression which normally will not happen. This is being investigated whether the source of problem is the lack of
some
keyword (because we can't use it) which results theabuse
of protocol or the problem lies in the compiler itself.Until the real fix shows up, we advice to use this function to configure
SomeView
instance. And yeah, this is the main source of@discardableResult
attribute in all methods.