Commit 6c36eb40 authored by Luca Bruno's avatar Luca Bruno

codewriter: Do not write (unowned string)[] for constants

The element type of a constant array is forced to be unowned
in the parser. Therefore we don't write (unowned string) to avoid
breaking vapi parsing uselessly with older valac versions.

Fixes bug 732080
parent 06001276
......@@ -166,7 +166,7 @@ public class Vala.ArrayType : ReferenceType {
public override string to_qualified_string (Scope? scope) {
var elem_str = element_type.to_qualified_string (scope);
if (element_type.is_weak ()) {
if (element_type.is_weak () && !(element_type.parent_node is Constant)) {
elem_str = "(unowned %s)".printf (elem_str);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment