[vala/0.36] vala: Subtype of string is allowed as constant
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] vala: Subtype of string is allowed as constant
- Date: Sun, 19 Nov 2017 09:21:29 +0000 (UTC)
commit 4cdf6330307eed2acf3d4e31ed6c3a9598455bbf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Nov 18 17:07:38 2017 +0100
vala: Subtype of string is allowed as constant
vala/valaconstant.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala
index 53b84c6..230c63d 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]