> On 21 Oct 2017, at 17:06, Chris Lattner <clatt...@nondot.org> wrote: > > FWIW, I’d be pretty opposed to making Void? implicitly discardable. In the > case of a generic function that returns T? where T can sometimes be void, the > optional still carries information: perhaps about failure of the operation or > something else. The reason that void and Never default to being ignored is > that they are carry no information. Void? carries one important bit.
Very well said. For that same reason “return void-expression” shall not be allowed (and not parsed as such in a multiline statement)? override func viewDidLoad() { super.viewDidLoad() return someView = SomeView(frame: view.bounds) .... } Although it doesn’t fully solve the problem, as the two types may well be something other than void. Mike _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution