]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Forbid pointer indirection for void type
authorLuca Bruno <lucabru@src.gnome.org>
Sat, 30 Apr 2011 15:42:00 +0000 (17:42 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 29 May 2011 09:27:32 +0000 (11:27 +0200)
Fixes bug 648890.

vala/valapointerindirection.vala

index 424958bd86141dbf32d68522c7619533cbb026f4..301ca7159715f517901918785cc6ace1a6810ea5 100644 (file)
@@ -86,7 +86,7 @@ public class Vala.PointerIndirection : Expression {
                }
                if (inner.value_type is PointerType) {
                        var pointer_type = (PointerType) inner.value_type;
-                       if (pointer_type.base_type is ReferenceType) {
+                       if (pointer_type.base_type is ReferenceType || pointer_type.base_type is VoidType) {
                                error = true;
                                Report.error (source_reference, "Pointer indirection not supported for this expression");
                                return false;