Mercurial > projects > ldc
comparison dmd/mtype.c @ 139:0ab29b838084 trunk
[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :)
Fixed: tango.io.Console seems to be working now.
author | lindquist |
---|---|
date | Tue, 22 Jan 2008 00:01:16 +0100 |
parents | 0e28624814e8 |
children | 5c17f81fc1c1 |
comparison
equal
deleted
inserted
replaced
138:aeddd4d533b3 | 139:0ab29b838084 |
---|---|
3971 return Type::dotExp(sc, e, ident); | 3971 return Type::dotExp(sc, e, ident); |
3972 } | 3972 } |
3973 return sym->basetype->dotExp(sc, e, ident); | 3973 return sym->basetype->dotExp(sc, e, ident); |
3974 } | 3974 } |
3975 | 3975 |
3976 Expression *TypeTypedef::getProperty(Loc loc, Identifier *ident) | |
3977 { | |
3978 if (ident == Id::init) | |
3979 { | |
3980 return Type::getProperty(loc, ident); | |
3981 } | |
3982 return sym->basetype->getProperty(loc, ident); | |
3983 } | |
3984 | |
3976 int TypeTypedef::isbit() | 3985 int TypeTypedef::isbit() |
3977 { | 3986 { |
3978 return sym->basetype->isbit(); | 3987 return sym->basetype->isbit(); |
3979 } | 3988 } |
3980 | 3989 |
4272 if (td) | 4281 if (td) |
4273 { | 4282 { |
4274 e = new DotTemplateExp(e->loc, e, td); | 4283 e = new DotTemplateExp(e->loc, e, td); |
4275 e->semantic(sc); | 4284 e->semantic(sc); |
4276 return e; | 4285 return e; |
4286 } | |
4287 | |
4288 TemplateInstance *ti = s->isTemplateInstance(); | |
4289 if (ti) | |
4290 { if (!ti->semanticdone) | |
4291 ti->semantic(sc); | |
4292 s = ti->inst->toAlias(); | |
4293 if (!s->isTemplateInstance()) | |
4294 goto L1; | |
4295 Expression *de = new DotExp(e->loc, e, new ScopeExp(e->loc, ti)); | |
4296 de->type = e->type; | |
4297 return de; | |
4277 } | 4298 } |
4278 | 4299 |
4279 d = s->isDeclaration(); | 4300 d = s->isDeclaration(); |
4280 #ifdef DEBUG | 4301 #ifdef DEBUG |
4281 if (!d) | 4302 if (!d) |
4644 e = new DotTemplateExp(e->loc, e, td); | 4665 e = new DotTemplateExp(e->loc, e, td); |
4645 e->semantic(sc); | 4666 e->semantic(sc); |
4646 return e; | 4667 return e; |
4647 } | 4668 } |
4648 | 4669 |
4670 TemplateInstance *ti = s->isTemplateInstance(); | |
4671 if (ti) | |
4672 { if (!ti->semanticdone) | |
4673 ti->semantic(sc); | |
4674 s = ti->inst->toAlias(); | |
4675 if (!s->isTemplateInstance()) | |
4676 goto L1; | |
4677 Expression *de = new DotExp(e->loc, e, new ScopeExp(e->loc, ti)); | |
4678 de->type = e->type; | |
4679 return de; | |
4680 } | |
4681 | |
4649 d = s->isDeclaration(); | 4682 d = s->isDeclaration(); |
4650 if (!d) | 4683 if (!d) |
4651 { | 4684 { |
4652 e->error("%s.%s is not a declaration", e->toChars(), ident->toChars()); | 4685 e->error("%s.%s is not a declaration", e->toChars(), ident->toChars()); |
4653 return new IntegerExp(e->loc, 1, Type::tint32); | 4686 return new IntegerExp(e->loc, 1, Type::tint32); |