`recursive template expansion` error msg isn't informative

drug drug2004 at bk.ru
Tue May 8 09:33:41 UTC 2018


07.05.2018 17:22, Timoses пишет:
> On Monday, 7 May 2018 at 10:28:14 UTC, drug wrote:
>> I get the error like:
>> ```
>> ./foo/bar/baz/builder.d(57,23): Error: template instance 
>> `staticMap!(DebugTypeMapper, BaseDebuggerTypes)` recursive template 
>> expansion
>> ```
>> That's all. It doesn's print instantiations stack so I can't track 
>> back the reason. Could someone give an advice how to struggle with 
>> such error?
> 
> Could you give us some code snippet to eventually reproduce it?

It's non trivial and not small code base and I failed to make a reduced 
case. I've found workaround just importing from the module some (any in 
fact) symbol. I just replaced:
```
import foo.bar;
```
by
```
import foo.bar; // here I need all symbols from the module
import foo.bar : anySymbolFromFooBar;
```



More information about the Digitalmars-d-learn mailing list