]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix automatic property access in structs
authorJürg Billeter <j@bitron.ch>
Mon, 22 Mar 2010 22:32:01 +0000 (23:32 +0100)
committerJürg Billeter <j@bitron.ch>
Mon, 22 Mar 2010 22:32:01 +0000 (23:32 +0100)
Fixes bug 609142.

codegen/valaccodememberaccessmodule.vala

index b3994bc22a9848109bbdb1c14e027d1dd742efd0..386d4d25931609080cfcd1c4ff537cf06f84d693 100644 (file)
@@ -1,6 +1,6 @@
 /* valaccodememberaccessmodule.vala
  *
- * Copyright (C) 2006-2009  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  * Copyright (C) 2006-2008  Raffaele Sandrini
  *
  * This library is free software; you can redistribute it and/or
@@ -232,6 +232,7 @@ internal class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                        if (prop.binding == MemberBinding.INSTANCE &&
                            prop.get_accessor.automatic_body &&
                            current_type_symbol == prop.parent_symbol &&
+                           current_type_symbol is Class &&
                            prop.base_property == null &&
                            prop.base_interface_property == null &&
                            !(prop.property_type is ArrayType || prop.property_type is DelegateType)) {