On 29 Mar 2017, at 11:38, Jonathan Hull via swift-evolution 
<swift-evolution@swift.org> wrote:
> 
> 
>> On Mar 27, 2017, at 11:27 AM, John McCall via swift-evolution 
>> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> 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
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to