Validate an associated type before looking at its default definition.
Validate an associated type before looking at its default definition.

No test case; this triggers on Basis and is extremely hard to minimize
outside of a large project. Fixes rdar://problem/20829839.

Swift SVN r28222

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