Sema: Allow EnumElementPatterns to infer bound generic parameters.
Sema: Allow EnumElementPatterns to infer bound generic parameters.

'case Optional.None:' should work and infer <T> from context. The rewrite to use resolveIdentifierType also fixed the problem with module-qualified enum patterns.

Swift SVN r9447

shahmishal/swift,arvedviehweger/swift,nathawes/swift,atrick/swift,sdulal/swift,OscarSwanros/swift,kstaring/swift,OscarSwanros/swift,gmilos/swift,ken0nek/swift,adrfer/swift,ken0nek/swift,gmilos/swift,calebd/swift,jtbandes/swift,dduan/swift,IngmarStein/swift,KrishMunot/swift,roambotics/swift,codestergit/swift,shahmishal/swift,lorentey/swift,ahoppen/swift,hughbe/swift,ben-ng/swift,atrick/swift,khizkhiz/swift,nathawes/swift,tkremenek/swift,LeoShimonaka/swift,milseman/swift,benlangmuir/swift,deyton/swift,brentdax/swift,jopamer/swift,djwbrown/swift,SwiftAndroid/swift,xedin/swift,lorentey/swift,amraboelela/swift,emilstahl/swift,benlangmuir/swift,apple/swift,nathawes/swift,shahmishal/swift,shahmishal/swift,djwbrown/swift,jtbandes/swift,uasys/swift,Ivacker/swift,tinysun212/swift-windows,jckarter/swift,LeoShimonaka/swift,gottesmm/swift,aschwaighofer/swift,kstaring/swift,JGiola/swift,tardieu/swift,glessard/swift,roambotics/swift,swiftix/swift,gmilos/swift,gottesmm/swift,CodaFi/swift,codestergit/swift,OscarSwanros/swift,mightydeveloper/swift,sschiau/swift,nathawes/swift,tjw/swift,russbishop/swift,SwiftAndroid/swift,swiftix/swift,glessard/swift,benlangmuir/swift,jopamer/swift,calebd/swift,xedin/swift,parkera/swift,russbishop/swift,gmilos/swift,CodaFi/swift,danielmartin/swift,jmgc/swift,codestergit/swift,mightydeveloper/swift,gribozavr/swift,xwu/swift,MukeshKumarS/Swift,kperryua/swift,aschwaighofer/swift,stephentyrone/swift,roambotics/swift,Ivacker/swift,emilstahl/swift,cbrentharris/swift,cbrentharris/swift,emilstahl/swift,karwa/swift,tinysun212/swift-windows,dreamsxin/swift,devincoughlin/swift,kperryua/swift,rudkx/swift,JGiola/swift,tinysun212/swift-windows,frootloops/swift,adrfer/swift,alblue/swift,cbrentharris/swift,therealbnut/swift,OscarSwanros/swift,emilstahl/swift,shahmishal/swift,austinzheng/swift,return/swift,shahmishal/swift,tjw/swift,modocache/swift,manavgabhawala/swift,parkera/swift,OscarSwanros/swift,swiftix/swift.old,roambotics/swift,bitjammer/swift,gottesmm/swift,frootloops/swift,devincoughlin/swift,tardieu/swift,glessard/swift,modocache/swift,return/swift,xwu/swift,huonw/swift,felix91gr/swift,swiftix/swift.old,brentdax/swift,stephentyrone/swift,jmgc/swift,CodaFi/swift,ken0nek/swift,alblue/swift,ken0nek/swift,JaSpa/swift,tardieu/swift,amraboelela/swift,sschiau/swift,zisko/swift,hooman/swift,zisko/swift,sschiau/swift,airspeedswift/swift,sschiau/swift,alblue/swift,return/swift,practicalswift/swift,LeoShimonaka/swift,nathawes/swift,MukeshKumarS/Swift,milseman/swift,sdulal/swift,Jnosh/swift,harlanhaskins/swift,gmilos/swift,KrishMunot/swift,JaSpa/swift,xwu/swift,huonw/swift,benlangmuir/swift,IngmarStein/swift,tkremenek/swift,therealbnut/swift,codestergit/swift,devincoughlin/swift,felix91gr/swift,jopamer/swift,khizkhiz/swift,uasys/swift,arvedviehweger/swift,jmgc/swift,swiftix/swift,parkera/swift,KrishMunot/swift,SwiftAndroid/swift,kentya6/swift,MukeshKumarS/Swift,austinzheng/swift,JGiola/swift,danielmartin/swift,huonw/swift,austinzheng/swift,natecook1000/swift,kentya6/swift,atrick/swift,gregomni/swift,JaSpa/swift,harlanhaskins/swift,adrfer/swift,MukeshKumarS/Swift,manavgabhawala/swift,jckarter/swift,natecook1000/swift,cbrentharris/swift,xedin/swift,brentdax/swift,lorentey/swift,karwa/swift,Ivacker/swift,allevato/swift,hooman/swift,dduan/swift,jckarter/swift,mightydeveloper/swift,mightydeveloper/swift,bitjammer/swift,jopamer/swift,alblue/swift,IngmarStein/swift,harlanhaskins/swift,LeoShimonaka/swift,aschwaighofer/swift,slavapestov/swift,frootloops/swift,jmgc/swift,johnno1962d/swift,zisko/swift,sschiau/swift,xwu/swift,apple/swift,danielmartin/swift,allevato/swift,huonw/swift,swiftix/swift,bitjammer/swift,arvedviehweger/swift,return/swift,IngmarStein/swift,LeoShimonaka/swift,jckarter/swift,sschiau/swift,devincoughlin/swift,hughbe/swift,jtbandes/swift,codestergit/swift,amraboelela/swift,kperryua/swift,manavgabhawala/swift,austinzheng/swift,khizkhiz/swift,xwu/swift,tinysun212/swift-windows,devincoughlin/swift,gregomni/swift,bitjammer/swift,kusl/swift,huonw/swift,ken0nek/swift,allevato/swift,kentya6/swift,gmilos/swift,brentdax/swift,gribozavr/swift,CodaFi/swift,MukeshKumarS/Swift,tkremenek/swift,xedin/swift,karwa/swift,Ivacker/swift,sschiau/swift,IngmarStein/swift,aschwaighofer/swift,kstaring/swift,harlanhaskins/swift,return/swift,practicalswift/swift,xedin/swift,jckarter/swift,harlanhaskins/swift,kusl/swift,milseman/swift,OscarSwanros/swift,aschwaighofer/swift,emilstahl/swift,tkremenek/swift,hooman/swift,practicalswift/swift,karwa/swift,CodaFi/swift,karwa/swift,modocache/swift,glessard/swift,airspeedswift/swift,IngmarStein/swift,felix91gr/swift,JGiola/swift,CodaFi/swift,lorentey/swift,zisko/swift,harlanhaskins/swift,kentya6/swift,kentya6/swift,amraboelela/swift,tardieu/swift,karwa/swift,manavgabhawala/swift,uasys/swift,milseman/swift,arvedviehweger/swift,parkera/swift,sdulal/swift,brentdax/swift,felix91gr/swift,jtbandes/swift,swiftix/swift.old,tkremenek/swift,Jnosh/swift,natecook1000/swift,adrfer/swift,airspeedswift/swift,lorentey/swift,tkremenek/swift,jtbandes/swift,shajrawi/swift,kperryua/swift,shajrawi/swift,aschwaighofer/swift,parkera/swift,jmgc/swift,JaSpa/swift,zisko/swift,karwa/swift,Ivacker/swift,hooman/swift,danielmartin/swift,ahoppen/swift,hooman/swift,shajrawi/swift,therealbnut/swift,jmgc/swift,jckarter/swift,xwu/swift,kusl/swift,felix91gr/swift,calebd/swift,rudkx/swift,gregomni/swift,tardieu/swift,lorentey/swift,bitjammer/swift,arvedviehweger/swift,stephentyrone/swift,ben-ng/swift,therealbnut/swift,rudkx/swift,Ivacker/swift,ben-ng/swift,felix91gr/swift,aschwaighofer/swift,swiftix/swift.old,MukeshKumarS/Swift,cbrentharris/swift,kstaring/swift,huonw/swift,codestergit/swift,ahoppen/swift,milseman/swift,nathawes/swift,tjw/swift,dreamsxin/swift,frootloops/swift,hooman/swift,hughbe/swift,amraboelela/swift,xedin/swift,ben-ng/swift,CodaFi/swift,slavapestov/swift,frootloops/swift,parkera/swift,xwu/swift,shajrawi/swift,kusl/swift,amraboelela/swift,hughbe/swift,djwbrown/swift,stephentyrone/swift,deyton/swift,therealbnut/swift,MukeshKumarS/Swift,airspeedswift/swift,cbrentharris/swift,sdulal/swift,kusl/swift,gregomni/swift,adrfer/swift,calebd/swift,felix91gr/swift,roambotics/swift,dduan/swift,johnno1962d/swift,slavapestov/swift,emilstahl/swift,russbishop/swift,practicalswift/swift,gottesmm/swift,adrfer/swift,natecook1000/swift,JaSpa/swift,gottesmm/swift,shajrawi/swift,natecook1000/swift,johnno1962d/swift,austinzheng/swift,hughbe/swift,SwiftAndroid/swift,JGiola/swift,modocache/swift,calebd/swift,johnno1962d/swift,modocache/swift,rudkx/swift,khizkhiz/swift,milseman/swift,deyton/swift,mightydeveloper/swift,jopamer/swift,zisko/swift,kusl/swift,russbishop/swift,tjw/swift,atrick/swift,airspeedswift/swift,airspeedswift/swift,devincoughlin/swift,jopamer/swift,russbishop/swift,swiftix/swift,OscarSwanros/swift,gottesmm/swift,tardieu/swift,roambotics/swift,kusl/swift,swiftix/swift.old,sschiau/swift,jckarter/swift,arvedviehweger/swift,slavapestov/swift,apple/swift,LeoShimonaka/swift,tinysun212/swift-windows,xedin/swift,deyton/swift,gribozavr/swift,johnno1962d/swift,russbishop/swift,KrishMunot/swift,emilstahl/swift,kperryua/swift,shahmishal/swift,mightydeveloper/swift,djwbrown/swift,Jnosh/swift,dduan/swift,jopamer/swift,uasys/swift,therealbnut/swift,Jnosh/swift,apple/swift,parkera/swift,kperryua/swift,xedin/swift,shajrawi/swift,ben-ng/swift,danielmartin/swift,huonw/swift,shahmishal/swift,kstaring/swift,slavapestov/swift,cbrentharris/swift,frootloops/swift,gottesmm/swift,SwiftAndroid/swift,LeoShimonaka/swift,djwbrown/swift,devincoughlin/swift,danielmartin/swift,Jnosh/swift,glessard/swift,calebd/swift,practicalswift/swift,Ivacker/swift,tjw/swift,Jnosh/swift,JaSpa/swift,glessard/swift,emilstahl/swift,gmilos/swift,djwbrown/swift,atrick/swift,modocache/swift,alblue/swift,rudkx/swift,deyton/swift,IngmarStein/swift,ken0nek/swift,kstaring/swift,codestergit/swift,ahoppen/swift,devincoughlin/swift,natecook1000/swift,kentya6/swift,adrfer/swift,ben-ng/swift,Ivacker/swift,khizkhiz/swift,zisko/swift,practicalswift/swift,russbishop/swift,SwiftAndroid/swift,sdulal/swift,khizkhiz/swift,brentdax/swift,swiftix/swift.old,shajrawi/swift,ahoppen/swift,tjw/swift,frootloops/swift,JGiola/swift,djwbrown/swift,tkremenek/swift,gribozavr/swift,apple/swift,manavgabhawala/swift,return/swift,bitjammer/swift,sdulal/swift,Jnosh/swift,stephentyrone/swift,KrishMunot/swift,johnno1962d/swift,jtbandes/swift,amraboelela/swift,kstaring/swift,manavgabhawala/swift,austinzheng/swift,arvedviehweger/swift,ben-ng/swift,tinysun212/swift-windows,kentya6/swift,hughbe/swift,tinysun212/swift-windows,stephentyrone/swift,modocache/swift,karwa/swift,airspeedswift/swift,uasys/swift,KrishMunot/swift,lorentey/swift,SwiftAndroid/swift,cbrentharris/swift,khizkhiz/swift,tjw/swift,johnno1962d/swift,stephentyrone/swift,kentya6/swift,shajrawi/swift,jtbandes/swift,dduan/swift,deyton/swift,danielmartin/swift,austinzheng/swift,uasys/swift,swiftix/swift,atrick/swift,hughbe/swift,JaSpa/swift,LeoShimonaka/swift,parkera/swift,allevato/swift,alblue/swift,rudkx/swift,swiftix/swift,therealbnut/swift,slavapestov/swift,practicalswift/swift,sdulal/swift,gribozavr/swift,dduan/swift,hooman/swift,gregomni/swift,slavapestov/swift,KrishMunot/swift,allevato/swift,gregomni/swift,allevato/swift,kusl/swift,gribozavr/swift,gribozavr/swift,natecook1000/swift,calebd/swift,brentdax/swift,deyton/swift,mightydeveloper/swift,bitjammer/swift,benlangmuir/swift,ken0nek/swift,gribozavr/swift,return/swift,apple/swift,sdulal/swift,nathawes/swift,tardieu/swift,swiftix/swift.old,milseman/swift,benlangmuir/swift,lorentey/swift,harlanhaskins/swift,uasys/swift,manavgabhawala/swift,kperryua/swift,alblue/swift,swiftix/swift.old,ahoppen/swift,practicalswift/swift,dduan/swift,jmgc/swift,allevato/swift,mightydeveloper/swift