2007-12-26 Jürg Billeter <j@bitron.ch>
+ * gobject/valaccodegeneratormemberaccess.vala: fix member access in
+ interface methods, fixes bug 504338
+
+ * tests/Makefile.am, tests/interfaces-properties.exp,
+ tests/interfaces-properties.vala: test interface properties
+
+2007-12-26 Jürg Billeter <j@bitron.ch>
+
* vala/valasymbolresolver.vala: fix crash on unresolved type name,
fixes bug 504014
/* base type is available if this is a type method */
if (current_type_symbol is Class) {
base_type = new ClassType ((Class) current_type_symbol);
+ } else if (current_type_symbol is Interface) {
+ base_type = new InterfaceType ((Interface) current_type_symbol);
} else {
base_type = new ValueType (current_type_symbol);
pub_inst = new CCodeIdentifier ("(*self)");
classes-signals.vala \
structs.vala \
interfaces.vala \
+ interfaces-properties.vala \
enums.vala \
delegates.vala \
exceptions.vala \
classes-signals.exp \
structs.exp \
interfaces.exp \
+ interfaces-properties.exp \
enums.exp \
delegates.exp \
exceptions.exp \
--- /dev/null
+Interface Properties Test: 1 2 3
--- /dev/null
+using GLib;
+
+interface Maman.Ibaz : Object {
+ public abstract int number { get; }
+
+ public void simple_method () {
+ int n = number;
+ stdout.printf (" %d", n);
+ }
+}
+
+class Maman.Baz : Object, Ibaz {
+ public int number {
+ get { return 2; }
+ }
+}
+
+class Maman.SubBaz : Baz {
+ static int main (string[] args) {
+ stdout.printf ("Interface Properties Test: 1");
+
+ Ibaz ibaz = new Baz ();
+ ibaz.simple_method ();
+
+ stdout.printf (" 3\n");
+
+ return 0;
+ }
+}