1 // { dg-additional-options -fmodules-ts } 2 3 import inter; 4 import worker; 5 6 namespace details 7 { 8 struct X 9 { 10 11 int m; XX12 X (int m) : m(m) 13 { 14 } 15 16 operator int () const 17 { 18 return m; 19 } 20 }; 21 22 } 23 main()24int main () 25 { 26 details::X x(2); 27 28 if (fn (x) != 2) // { dg-error "not declared in" } 29 return 1; 30 31 // { dg-regexp "\n\[^\n]*adl-3_b.C:8:13: error: 'fn' was not declared in this scope$" } 32 if (TPL (x) != 2) // { dg-message "required from here" } 33 return 2; 34 35 return 0; 36 } 37