www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Cannot use locat x as parameter to non-global template y

reply "simendsjo" <simendsjo gmail.com> writes:
God, I hate these errors. Tried updating dmd head, and these 
started popping up.
Now I have to move all templates out...
Sep 22 2013
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
simendsjo:

 God, I hate these errors. Tried updating dmd head, and these 
 started popping up.
 Now I have to move all templates out...
Can you show a small example of code that gives that error? Bye, bearophile
Sep 22 2013
next sibling parent "simendsjo" <simendsjo gmail.com> writes:
On Sunday, 22 September 2013 at 12:26:03 UTC, bearophile wrote:
 simendsjo:

 God, I hate these errors. Tried updating dmd head, and these 
 started popping up.
 Now I have to move all templates out...
Can you show a small example of code that gives that error? Bye, bearophile
Nope. I cannot get dustmite to work: https://github.com/CyberShadow/DustMite/issues/16
Sep 22 2013
prev sibling parent reply "simendsjo" <simendsjo gmail.com> writes:
On Sunday, 22 September 2013 at 12:26:03 UTC, bearophile wrote:
 simendsjo:

 God, I hate these errors. Tried updating dmd head, and these 
 started popping up.
 Now I have to move all templates out...
Can you show a small example of code that gives that error? Bye, bearophile
dustmite for the win! template A(T...) { template B(alias T) { } } void main() { void fv() {} alias A!(fv) F; F.B!F; } dmd -unittest t.d t.d(8): Error: template instance B!(A!(fv)) cannot use local 'A!(fv)' as parameter to non-global template B(alias T)
Sep 22 2013
parent "simendsjo" <simendsjo gmail.com> writes:
On Sunday, 22 September 2013 at 13:36:48 UTC, simendsjo wrote:
 On Sunday, 22 September 2013 at 12:26:03 UTC, bearophile wrote:
 simendsjo:

 God, I hate these errors. Tried updating dmd head, and these 
 started popping up.
 Now I have to move all templates out...
Can you show a small example of code that gives that error? Bye, bearophile
dustmite for the win! template A(T...) { template B(alias T) { } } void main() { void fv() {} alias A!(fv) F; F.B!F; } dmd -unittest t.d t.d(8): Error: template instance B!(A!(fv)) cannot use local 'A!(fv)' as parameter to non-global template B(alias T)
Added a ticket too: http://d.puremagic.com/issues/show_bug.cgi?id=11098 Probably a dup of many of the other local aliasing tickets though..
Sep 22 2013