From 3904aeb6eaefed80ddd50926f259e87c9507588b Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 18 Nov 2017 17:07:38 +0100 Subject: [PATCH] vala: Subtype of string is allowed as constant --- vala/valaconstant.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2