Bug 1774 – CTFE rejects nested template expansion

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-01-08T13:17:00Z
Last change time
2015-06-09T01:14:26Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
sean

Comments

Comment #0 by sean — 2008-01-08T13:17:46Z
This is related to issue #1742. In the code below, calling proc_!(char).fn explicitly in the global scope works, but calling it explicitly in a template function fails. I would expect both to work. template proc_( T ) { size_t fn( in T[] a, in T b ) { return 0; } } template proc( T1, T2 ) { size_t proc( T1 a, T2 b ) { return proc_!(char).fn( a, b ); } } const a = proc_!(char).fn( "abcde", 'c' ); const b = proc( "abcde", 'c' ); void main() { }
Comment #1 by samukha — 2008-11-13T01:22:32Z
Works with dmd 2.020