switch foo { case let bar as Bar: ... case let baz as Baz: ... case let qux as Qux: ... }
extension Foo.Qux { var ee: Double { return e * e } }