PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/runtime/typeinfo/ti_function.d

http://github.com/wilkie/djehuty
D | 32 lines | 16 code | 9 blank | 7 comment | 1 complexity | 190e45bdf55311c284744bde5d96f9e2 MD5 | raw file
 1/*
 2 * ti_function.d
 3 *
 4 * This module implements the TypeInfo for function types.
 5 *
 6 */
 7
 8module runtime.typeinfo.ti_function;
 9
10class TypeInfo_Function : TypeInfo {
11	char[] toString() {
12		return next.toString() ~ "()";
13	}
14
15	int opEquals(Object o) {
16		TypeInfo_Function c;
17
18		return this is o ||
19				((c = cast(TypeInfo_Function)o) !is null &&
20				 this.next == c.next);
21	}
22
23	// BUG: need to add the rest of the functions
24
25	size_t tsize() {
26		return 0;		// no size for functions
27	}
28
29	TypeInfo next;
30}
31
32