comparison sema/Symbol.d @ 135:9869194de9b7

Removed some output We have 15 tests that fail in release mode and 17 in debug - both from things that are only handled by an assert. One is a comments lexing test, that fails on an invalid location in debug The other is returning a struct - it's cought in codegen by an assert, but should be checked explicitly before that
author Anders Halager <halager@gmail.com>
date Wed, 09 Jul 2008 13:38:11 +0200
parents 3635fc5428b1
children 2be29b296081
comparison
equal deleted inserted replaced
134:570a4917413a 135:9869194de9b7
41 Try to find a contained symbol with the given name - returns null if not 41 Try to find a contained symbol with the given name - returns null if not
42 found 42 found
43 **/ 43 **/
44 Symbol findMember(char[] member) 44 Symbol findMember(char[] member)
45 { 45 {
46 Stdout.formatln("Trying to find {} in {}", member, name);
47 foreach (possible; actual.contained) 46 foreach (possible; actual.contained)
48 if (possible.name == member) 47 if (possible.name == member)
49 {
50 Stdout.formatln(" - found it: {} ({})", possible.getFQN(), possible.getMangledFQN());
51 return possible; 48 return possible;
52 }
53 return null; 49 return null;
54 } 50 }
55 51
56 void dump() 52 void dump()
57 { 53 {
65 } 61 }
66 62
67 /// Create a member with the given name and type 63 /// Create a member with the given name and type
68 Symbol createMember(char[] member, DType type) 64 Symbol createMember(char[] member, DType type)
69 { 65 {
70 Stdout.formatln("Creating {} of type {} in {}", member, type.mangle, name);
71 auto res = new Symbol(member, type, this); 66 auto res = new Symbol(member, type, this);
72 actual.contained ~= res; 67 actual.contained ~= res;
73 return res; 68 return res;
74 } 69 }
75 70