hydroxychloroquine (HCQ) Synthesis: Which mechanism?
The 2 and 4 positions of quinolines are similar to the 2 and 4 positions of pyridine in reactivity. 2 and 4 haloquinolines/pyridines are highly reactive to nucleophiles by SNAr. Indeed 4-Cl-pyridine has to be handled as the hydrochloride because of its propensity to self condense. 

The 7 position, by contrast, is unactivated and similar in reactivity to benzenes, so the 7-Cl is not going to undergo SNAr without specialist catalysis.