compiler: generate methods names with lowercased first letter

Methods names from debuginfo should match methods names from manifest.
Original method names are stored in ID field.
This commit is contained in:
Anna Shaleva 2020-08-13 10:29:08 +03:00
parent 3c170271c4
commit 9456f729be
3 changed files with 13 additions and 7 deletions

View file

@ -69,7 +69,7 @@ func unexportedMethod() int { return 1 }
"unexportedMethod": "Integer",
}
for i := range d.Methods {
name := d.Methods[i].Name.Name
name := d.Methods[i].ID
assert.Equal(t, returnTypes[name], d.Methods[i].ReturnType)
}
})
@ -79,7 +79,7 @@ func unexportedMethod() int { return 1 }
"Main": {"s,String", "res,Integer"},
}
for i := range d.Methods {
v, ok := vars[d.Methods[i].Name.Name]
v, ok := vars[d.Methods[i].ID]
if ok {
require.Equal(t, v, d.Methods[i].Variables)
}
@ -112,7 +112,7 @@ func unexportedMethod() int { return 1 }
}},
}
for i := range d.Methods {
v, ok := paramTypes[d.Methods[i].Name.Name]
v, ok := paramTypes[d.Methods[i].ID]
if ok {
require.Equal(t, v, d.Methods[i].Parameters)
}