D-Programming-Language/dmd — pull request #3103 by 9rnsr (2014-01-15 14:22:54+00:00)
Title: Issue 10133 - ICE for templated static conditional lambda

https://d.puremagic.com/issues/show_bug.cgi?id=10133

Currently template constraint is evaluated under the following nested scope:
```
TemplateDeclaration
+ FuncDeclaration (if exists)
+ constraint
```

But this is very special hierarchy, because normally `TemplateDeclaration` does not appear in symbol tree. This PR changes it to:

```
TemplateInstance (artificially made)
+ FuncDeclaration (artificially made, if exists)
+ constraint
```

by emulating template instantiation.