mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: remove unused generated func (#17258)
This commit is contained in:
parent
404a9aa442
commit
fbfdab9e2d
@ -6466,6 +6466,8 @@ static inline __shared__${interface_name} ${shared_fn_name}(__shared__${cctype}*
|
|||||||
}
|
}
|
||||||
for vtyp, variants in inter_info.conversions {
|
for vtyp, variants in inter_info.conversions {
|
||||||
vsym := g.table.sym(vtyp)
|
vsym := g.table.sym(vtyp)
|
||||||
|
|
||||||
|
if variants.len > 0 {
|
||||||
conversion_functions.write_string('static inline bool I_${interface_name}_is_I_${vsym.cname}(${interface_name} x) {\n\treturn ')
|
conversion_functions.write_string('static inline bool I_${interface_name}_is_I_${vsym.cname}(${interface_name} x) {\n\treturn ')
|
||||||
for i, variant in variants {
|
for i, variant in variants {
|
||||||
variant_sym := g.table.sym(variant)
|
variant_sym := g.table.sym(variant)
|
||||||
@ -6475,6 +6477,7 @@ static inline __shared__${interface_name} ${shared_fn_name}(__shared__${cctype}*
|
|||||||
conversion_functions.write_string('(x._typ == _${interface_name}_${variant_sym.cname}_index)')
|
conversion_functions.write_string('(x._typ == _${interface_name}_${variant_sym.cname}_index)')
|
||||||
}
|
}
|
||||||
conversion_functions.writeln(';\n}')
|
conversion_functions.writeln(';\n}')
|
||||||
|
}
|
||||||
|
|
||||||
conversion_functions.writeln('static inline ${vsym.cname} I_${interface_name}_as_I_${vsym.cname}(${interface_name} x) {')
|
conversion_functions.writeln('static inline ${vsym.cname} I_${interface_name}_as_I_${vsym.cname}(${interface_name} x) {')
|
||||||
for variant in variants {
|
for variant in variants {
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
interface Foo {}
|
||||||
|
|
||||||
|
interface Bar {}
|
||||||
|
|
||||||
|
pub fn set_foo(mut foo Foo) {
|
||||||
|
if foo is Bar {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test_main() {}
|
Loading…
Reference in New Issue
Block a user