[swift-evolution] [Review] SE-0026 Abstract classes and methods

Brent Royal-Gordon brent at architechies.com
Fri Mar 4 04:11:40 CST 2016


> var url : NSURL {
> 
>  assert(false,"Must be overridden”)
>  return NSURL(fileURLWithPath: “/ignore/this”)
> }

For what it's worth, using `fatalError()` or `preconditionFailure()` will allow you to write a version of this with no return statement, because they are annotated with `@noreturn`.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list