Work around a closure-in-REPL regression in ContextualizeClosures.
Work around a closure-in-REPL regression in ContextualizeClosures.

REPL closures in 'if' context trigger another assertion failure, where ContextualizeClosures seems to be getting reentered for mysterious reasons I can't work out. As a workaround, if a closure already has a parent consistent with the parent that would be assigned and a valid discriminator, give up early.

Swift SVN r11552

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