opinion: Mr. Justice Frankfurter
  delivered the opinion of the Court.
  This is an action by Local 37 of the International Longshoremen’s and Warehousemen’s Union and several of its alien members to enjoin the District Director of Immigration and Naturalization at Seattle from so construing § 212 (d) (7) of the Immigration and Nationality Act of 1952 as to treat aliens domiciled in the continental United States returning from temporary work in Alaska as if they were aliens entering the United States for the first time. Declaratory relief to the same effect is also sought. Since petitioners asserted in the alternative that such a construction of the challenged statute would be unconstitutional, a three-judge district court was convened. The case came before it on stipulated facts and issues of law, from which it appeared that the union has over three thousand members who work every summer in the herring and salmon canneries of Alaska, that some of these are aliens, and that if alien workers going to Alaska for the 1953 canning season were excluded on their return, their “contract and property rights [would] be jeopardized and forfeited.” The District Court entertained the suit but dismissed it on the merits. 111 F. Supp. 802. In our order of October 12, 1953, we postponed the question of jurisdiction to the hearing on the merits. 346 U. S. 804.
  On this appeal, appellee contends that the District Court should not have reached the statutory and constitutional questions — that it should have dismissed the suit for want of a “case or controversy,” for lack of standing on the union’s part to bring this action, because the Attorney General was an indispensable party, and because habeas corpus is the exclusive method for judicial inquiry in deportation cases. Since the first objection is conclusive, there is an end of the matter.
  Appellants in effect asked the District Court to rule that a statute the sanctions of which had not been set in motion against individuals on whose behalf relief was sought, because an occasion for doing so had not arisen, would not be applied to them if in the future such a contingency should arise. That is not a lawsuit to enforce a right; it is an endeavor to obtain a court’s assurance that a statute does not govern hypothetical situations that may or may not make the challenged statute applicable. Determination of the scope and constitutionality of legislation in advance of its immediate adverse effect in the context of a concrete case involves too remote and abstract an inquiry for the proper exercise of the judicial function. United Public Workers v. Mitchell, 330 U. S. 75; see Muskrat v. United States, 219 U. S. 346, and Alabama State Federation of Labor v. McAdory, 325 U. S. 450. Since we do not have on the record before us a controversy appropriate for adjudication, the judgment of the District Court must be vacated, with directions to dismiss the complaint.
  It is so ordered.
  This section states that the exclusionary provisions of § 212 (a) shall, with exceptions not here relevant, “be applicable to any alien who shall leave Hawaii, Alaska, Guam, Puerto Rico, or the Virgin Islands of the United States, and who seeks to enter the continental United States . . . 8 U. S. C. § 1182 (d) (7).