   }
 }
 
-extension ClassF: ProtocolE, ProtocolG { }
+extension ClassF: ProtocolA, ProtocolB { }
 
 public class ClassG <T> {
   func foo() -> Int {

  }
}

extension ClassC: ProtocolC { }

public class ClassD { }
public class ClassE : ClassD {

  return x.foo()
}

func shouldOptimize2(_ x: ClassD & ProtocolA) -> Int {
  return x.foo()
}

func shouldOptimize3(_ x: ProtocolA & ProtocolB) -> Int {
  return x.foo() + x.bar()
}

func shouldOptimize4(_ x: ProtocolA & ProtocolB) -> Int {
  return x.foo() + x.bar()
}

func shouldOptimize5(_ x: ClassH.type & ProtocolA) -> Int {
  return x.foo()
}

