From: Rico Tzschichholz Date: Sat, 18 Nov 2017 16:07:38 +0000 (+0100) Subject: vala: Subtype of string is allowed as constant X-Git-Tag: 0.34.13~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3904aeb6eaefed80ddd50926f259e87c9507588b;p=thirdparty%2Fvala.git vala: Subtype of string is allowed as constant --- diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala index 53b84c60e..230c63d5e 100644 --- a/vala/valaconstant.vala +++ b/vala/valaconstant.vala @@ -195,7 +195,7 @@ public class Vala.Constant : Symbol, Lockable { } else if (type is ArrayType) { var array_type = type as ArrayType; return check_const_type (array_type.element_type, context); - } else if (type.data_type == context.analyzer.string_type.data_type) { + } else if (type.data_type.is_subtype_of (context.analyzer.string_type.data_type)) { return true; } else { return false;