- s = (memberinfo_t*)methodinfo_register_onclass(c, access, name);
- } else if(trait->kind == TRAIT_SLOT ||
- trait->kind == TRAIT_GETTER) {
- s = (memberinfo_t*)varinfo_register_onclass(c, access, name);
+ s = (memberinfo_t*)methodinfo_register_onclass(c, access, ns, name);
+ s->return_type = resolve_class(filename, "return type", trait->method->return_type);
+ dict_put(names, name, 0);
+ } else if(trait->kind == TRAIT_SLOT) {
+ s = (memberinfo_t*)varinfo_register_onclass(c, access, ns, name);
+ s->type = resolve_class(filename, "type", trait->type_name);
+ dict_put(names, name, 0);
+ } else if(trait->kind == TRAIT_GETTER) {
+ s = (memberinfo_t*)varinfo_register_onclass(c, access, ns, name);
+ s->type = resolve_class(filename, "type", trait->method->return_type);
+ dict_put(names, name, 0);
+ } else if(trait->kind == TRAIT_CONST) {
+ /* some variables (e.g. XML.length) are apparently both a method and a slot.
+ needs split of static/non-static first */
+ if(!dict_contains(names, name)) {
+ varinfo_t*v = (varinfo_t*)varinfo_register_onclass(c, access, ns, name);
+ v->type = resolve_class(filename, "type", trait->type_name);
+ v->flags |= FLAG_CONST;
+ /* leave this alone for now- it blows up the file too much
+ v->value = constant_clone(trait->value);*/
+ s = (memberinfo_t*)v;
+ dict_put(names, name, 0);
+ } else
+ goto cont;
+