[vala/0.12] Forbid pointer indirection for void type



commit d71de8d017f94f039dad04e8db27b0af814c4d13
Author: Luca Bruno <lucabru src gnome org>
Date:   Sat Apr 30 17:42:00 2011 +0200

    Forbid pointer indirection for void type
    
    Fixes bug 648890.

 vala/valapointerindirection.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valapointerindirection.vala b/vala/valapointerindirection.vala
index 424958b..301ca71 100644
--- a/vala/valapointerindirection.vala
+++ b/vala/valapointerindirection.vala
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]