On 29 Mar 2017, at 11:38, Jonathan Hull via swift-evolution
<[email protected]> wrote:
>
>
>> On Mar 27, 2017, at 11:27 AM, John McCall via swift-evolution
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> In fact, we should probably double-down on this design and add an
>> "unimplemented" expression that always triggers warnings and just traps if
>> you try to evaluate it. That expression would be a logical thing to use in
>> e.g. code snippets automatically inserted by an IDE.
>
> Yes, please.
You can do this already:
func unimplemented<T>(_ file:String = #file,_ line:Int = #line) -> T {
fatalError("Not implemented \(file):\(line)")
}
let f: String = unimplemented()
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution