]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
support taking address of pointer
authorJuerg Billeter <j@bitron.ch>
Tue, 18 Mar 2008 22:19:30 +0000 (22:19 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 18 Mar 2008 22:19:30 +0000 (22:19 +0000)
2008-03-18  Juerg Billeter  <j@bitron.ch>

* vala/valasemanticanalyzer.vala: support taking address of pointer

svn path=/trunk/; revision=1137

ChangeLog
vala/valasemanticanalyzer.vala

index 842c4a73aeea6b96e6eaf6c909f302308a6742b4..a645804bd298d0ad84c8cad4dab7e1d5ac29f14a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-18  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valasemanticanalyzer.vala: support taking address of pointer
+
 2008-03-17  Jürg Billeter  <j@bitron.ch>
 
        * vapi/packages/gtk+-2.0/: fix gtk_calendar_get_date binding
index 89393eb9605b14d092969b2a1151341bd134f44e..c868d51d0a4eeb0ce761a485b1d98ad11aa23466 100644 (file)
@@ -2390,12 +2390,10 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                if (expr.inner.error) {
                        return;
                }
-               if (expr.inner.static_type == null) {
-                       expr.error = true;
-                       Report.error (expr.source_reference, "internal error: unknown type of inner expression");
-                       return;
-               }
-               if (expr.inner.static_type.data_type == null) {
+               if (!(expr.inner.static_type is ValueType
+                     || expr.inner.static_type is ClassType
+                     || expr.inner.static_type is InterfaceType
+                     || expr.inner.static_type is PointerType)) {
                        expr.error = true;
                        Report.error (expr.source_reference, "Address-of operator not supported for this expression");
                        return;