]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Support taking address of generic variables
authorDidier 'Ptitjes <ptitjes@free.fr>
Tue, 21 Jul 2009 08:11:57 +0000 (10:11 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 21 Jul 2009 12:22:15 +0000 (14:22 +0200)
Fixes bug 589236.

Signed-off-by: Didier 'Ptitjes <ptitjes@free.fr>
vala/valaaddressofexpression.vala

index 4874a2b0a89dcb3c58fff0de2e8d4a494ee45493..2859a2c3941bdf0005e8f43f65bfeb174b7c48ad 100644 (file)
@@ -83,7 +83,8 @@ public class Vala.AddressofExpression : Expression {
                }
                if (!(inner.value_type is ValueType
                      || inner.value_type is ObjectType
-                     || inner.value_type is PointerType)) {
+                     || inner.value_type is PointerType
+                     || inner.value_type is GenericType)) {
                        error = true;
                        Report.error (source_reference, "Address-of operator not supported for this expression");
                        return false;