From: Juerg Billeter Date: Mon, 7 Apr 2008 14:08:31 +0000 (+0000) Subject: check accessiblity of property types, fixes bug 512404 X-Git-Tag: VALA_0_2_0~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=071491e89f74a82713766284ffafead30abdc5de;p=platform%2Fupstream%2Fvala.git check accessiblity of property types, fixes bug 512404 2008-04-07 Juerg Billeter * vala/valasemanticanalyzer.vala: check accessiblity of property types, fixes bug 512404 svn path=/trunk/; revision=1171 --- diff --git a/ChangeLog b/ChangeLog index df042ef..1acf173 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-04-07 Jürg Billeter + * vala/valasemanticanalyzer.vala: check accessiblity of property + types, fixes bug 512404 + +2008-04-07 Jürg Billeter + * gobject/valaccodeassignmentbinding.vala: fix element access assignment with pointers, fixes bug 519933 diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index c27eeb5..882a7af 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -621,6 +621,13 @@ public class Vala.SemanticAnalyzer : CodeVisitor { prop.accept_children (this); + // check whether property type is at least as accessible as the property + if (!is_type_accessible (prop, prop.type_reference)) { + prop.error = true; + Report.error (prop.source_reference, "property type `%s` is less accessible than property `%s`".printf (prop.type_reference.to_string (), prop.get_full_name ())); + return; + } + /* abstract/virtual properties using reference types without * reference counting need to transfer ownership of their * return values because of limitations in the GObject property