protected override ICode VisitInitObj(StmtInitObj s) { this.NewLine(); this.code.AppendFormat("init-object<{0}>(", s.Type.Name); this.Visit(s.Destination); this.code.Append(")"); return s; }
protected override ICode VisitInitObj(StmtInitObj s) { this.NewLine(); this.Visit(s.Destination); this.js.Append(" = "); var defaultValue = DefaultValuer.Get(s.Type, this.resolver.FieldNames); this.js.Append(defaultValue); this.js.Append(";"); return s; }
private Stmt InitObj(TypeReference type) { var expr = this.stack.Pop(); var stmt = new StmtInitObj(this.ctx, expr, type); return stmt; }