D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6304 - DMD does not recognize size_t parameter type while type matching
Summary: DMD does not recognize size_t parameter type while type matching
Status: RESOLVED DUPLICATE of issue 2355
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 18:21 UTC by Puneet Goel
Modified: 2011-07-12 18:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Puneet Goel 2011-07-12 18:21:28 UTC
Here is a small test case. I get this error on dmd 2.054/053/052/051.
Error vanishes if I replace size_t with ulong on line 6 (inside the is expression).

$ dmd struct.d
Error: undefined identifier size_t
struct.d(11): Error: template instance struct.printFoo!(Foo!(Bar,1)) error instantiating


// struct.d
import std.stdio;
struct Foo(IF, size_t N) {}
interface Bar {}
void printFoo(T)(T foo) {
  static if(is(T L: Foo!(IF, N), IF, size_t N)) {
      writeln("Type: ", T.stringof);
    }
}
void main() {
  Foo!(Bar, 1) foo;
  printFoo(foo);
}
Comment 1 yebblies 2011-07-12 18:25:35 UTC

*** This issue has been marked as a duplicate of issue 2355 ***