[vala] Forbid pointer indirection for void type
- From: Luca Bruno <lucabru src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [vala] Forbid pointer indirection for void type
 
- Date: Sat, 30 Apr 2011 15:46:19 +0000 (UTC)
 
commit 19d32a9e196a0e78be1721c5add06cf6c8174f21
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]