1 // RUN: rm -rf %t 2 // RUN: mkdir -p %t 3 // RUN: split-file %s %t 4 // 5 // RUN: %clang_cc1 -std=c++20 %t/template_default_arg.cppm -emit-module-interface -o %t/template_default_arg.pcm 6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify 7 // 8 //--- template_default_arg.cppm 9 export module template_default_arg; 10 struct t {}; 11 12 export template <typename T = t> 13 struct A { 14 T a; 15 }; 16 17 //--- Use.cpp 18 import template_default_arg; bar()19void bar() { 20 A<> a0; 21 A<t> a1; // expected-error {{declaration of 't' must be imported from module 'template_default_arg' before it is required}} 22 // expected-note@* {{declaration here is not visible}} 23 } 24