Closed
Description
The following is accepted by clang version 20.1.6:
//--- A.cppm
export module A;
export using T = int;
//--- M.cppm
export module M;
import A;
//--- M.cpp
module M;
T x;
This is rejected:
//--- A.cppm
export module A;
export using T = int;
//--- P.cppm
export module M:P;
import A;
//--- M.cppm
export module M;
export import :P;
//--- M.cpp
module M;
T x;
But this is again accepted:
//--- A.cppm
export module A;
export using T = int;
//--- P.cppm
module M:P;
import A;
//--- M.cppm
export module M;
import :P;
//--- M.cpp
module M;
T x;
I think the relevant paragraphs are [basic.lookup.general]//p2,3 and that the correct behaviour is to reject in all cases. Because of [basic.lookup.general]//p2,3 in combination with [module.import]//p7 the correct behaviour is probably to accept in all cases.