@@ -111,25 +111,24 @@ public fn BuiltinExpr* BuiltinExpr.createToContainer(ast_context.Context* c, Src
111111}
112112
113113fn Expr* BuiltinExpr.instantiate(BuiltinExpr* e, Instantiator* inst) {
114- BuiltinExpr* bi = nil;
115114 switch (e.getKind()) {
116115 case Sizeof:
117116 case Elemsof:
118117 case EnumMin:
119118 case EnumMax:
120- bi = BuiltinExpr.create(inst.c, e.base.base.loc, e.base.base.builtinExprBits.src_len, e.inner.instantiate(inst), e.getKind());
121- break ;
119+ return (Expr*) BuiltinExpr.create(inst.c, e.base.base.loc, e.base.base.builtinExprBits.src_len,
120+ e.inner.instantiate(inst), e.getKind()) ;
122121 case OffsetOf:
123- bi = BuiltinExpr.createOffsetOf(inst.c, e.base.base.loc, e.base.base.builtinExprBits.src_len, e.inner.instantiate(inst), e.offset[0].member.instantiate(inst));
124- break;
122+ return (Expr*)BuiltinExpr.createOffsetOf(inst.c, e.base.base.loc, e.base.base.builtinExprBits.src_len,
123+ e.inner.instantiate(inst),
124+ e.offset[0].member.instantiate(inst));
125125 case ToContainer:
126- bi = BuiltinExpr.createToContainer(inst.c, e.base.base.loc, e.base.base.builtinExprBits.src_len,
127- e.inner.instantiate(inst),
128- e.container[0].member.instantiate(inst),
129- e.container[0].pointer.instantiate(inst));
130- break;
126+ return (Expr*)BuiltinExpr.createToContainer(inst.c, e.base.base.loc, e.base.base.builtinExprBits.src_len,
127+ e.inner.instantiate(inst),
128+ e.container[0].member.instantiate(inst),
129+ e.container[0].pointer.instantiate(inst));
131130 }
132- return (Expr*)bi ;
131+ return nil ;
133132}
134133
135134public fn BuiltinExprKind BuiltinExpr.getKind(const BuiltinExpr* e) {
0 commit comments