gen: fix interface method call name that is a C reserved word (#8091)
parent
70ad49e186
commit
a1245de25b
|
@ -347,7 +347,8 @@ fn (mut g Gen) method_call(node ast.CallExpr) {
|
|||
g.write('${c_name(receiver_type_name)}_name_table[')
|
||||
g.expr(node.left)
|
||||
dot := if node.left_type.is_ptr() { '->' } else { '.' }
|
||||
g.write('${dot}_interface_idx].${node.name}(')
|
||||
mname := c_name(node.name)
|
||||
g.write('${dot}_interface_idx].${mname}(')
|
||||
g.expr(node.left)
|
||||
g.write('${dot}_object')
|
||||
if node.args.len > 0 {
|
||||
|
|
|
@ -177,6 +177,7 @@ fn (f RegTest) register() {
|
|||
}
|
||||
|
||||
fn handle_reg(r Register) {
|
||||
r.register()
|
||||
}
|
||||
|
||||
fn test_register() {
|
||||
|
|
Loading…
Reference in New Issue