~ubuntu-branches/ubuntu/maverick/vala/maverick

« back to all changes in this revision

Viewing changes to vala/valafield.vala

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-04-02 10:10:55 UTC
  • mfrom: (1.4.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100402101055-qbx3okzv0tnp3wpp
Tags: 0.8.0-0ubuntu1
* New upstream release:
  - Infer type arguments when calling generic methods.
  - Support `in' operator for arrays.
  - Add experimental support for regular expression literals.
  - Add experimental support for chained relational expressions.
  - Add va_list support.
  - Add clutter-gtk-0.10 bindings (Gordon Allott).
  - Add gdl-1.0 bindings (Nicolas Joseph).
  - Add gstreamer-app-0.10 bindings (Sebastian Dröge).
  - Add gstreamer-cdda-0.10 bindings (Sebastian Dröge).
  - Add gudev-1.0 bindings (Jim Nelson).
  - Add libgda-report-4.0 bindings (Shawn Ferris).
  - Add libgvc (graphviz) bindings (Martin Olsson).
  - Add purple bindings (Adrien Bustany).
  - Many bug fixes and binding updates.
* debian/patches/99_ltmain_as-needed.patch: refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* valafield.vala
2
2
 *
3
 
 * Copyright (C) 2006-2009  Jürg Billeter
 
3
 * Copyright (C) 2006-2010  Jürg Billeter
4
4
 *
5
5
 * This library is free software; you can redistribute it and/or
6
6
 * modify it under the terms of the GNU Lesser General Public
93
93
                get { return (array_length_cexpr != null); }
94
94
        }
95
95
 
 
96
        /**
 
97
         * Specifies a custom type for the array length.
 
98
         */
 
99
        public string? array_length_type { get; set; default = null; }
 
100
 
96
101
        private string? array_length_cname;
97
102
 
98
103
        private string? array_length_cexpr;
229
234
                if (a.has_argument ("array_length_cexpr")) {
230
235
                        set_array_length_cexpr (a.get_string ("array_length_cexpr"));
231
236
                }
 
237
                if (a.has_argument ("array_length_type")) {
 
238
                        array_length_type = a.get_string ("array_length_type");
 
239
                }
232
240
                if (a.has_argument ("delegate_target")) {
233
241
                        no_delegate_target = !a.get_bool ("delegate_target");
234
242
                }
316
324
                                return false;
317
325
                        }
318
326
 
 
327
                        if (initializer.value_type == null) {
 
328
                                error = true;
 
329
                                Report.error (source_reference, "expression type not allowed as initializer");
 
330
                                return false;
 
331
                        }
 
332
 
319
333
                        if (!initializer.value_type.compatible (field_type)) {
320
334
                                error = true;
321
335
                                Report.error (source_reference, "Cannot convert from `%s' to `%s'".printf (initializer.value_type.to_string (), field_type.to_string ()));