GNOME Bugzilla – Bug 760724
error "Incompatible operand" when adding arrays
Last modified: 2018-02-26 08:01:21 UTC
i want to add 2 arrays. this is not working: const beziehung_m : array of string = {"Vater", "Bruder", "Mann", "Sohn", "Onkel", "Opa", "Cousin", "Freund", "Kollege", "Mitbewohner"} const beziehung_w : array of string = {"Mutter", "Schwester", "Frau", "Tochter", "Tante", "Oma", "Cousine", "Freundin", "Kollegin", "Mitbewohnerin"} const beziehung = beziehung_m + beziehung_w error: syntax error, expected `:' but got `=' with previous unknown token it should get the type from the other arrays. but also if i provide the type with: const beziehung : array of string = beziehung_m + beziehung_w error: Incompatible operand
I don't know much about genie but (array)+(array) is not supported in vala. Use GLib.Memory.copy to build a new array.
*** This bug has been marked as a duplicate of bug 623856 ***