~vcs-imports/vala/trunk

Viewing all changes in revision 9540.

  • Committer: Rico Tzschichholz
  • Author(s): Nick Schrader
  • Date: 2020-06-02 11:02:42 UTC
  • Revision ID: git-v1:35f72f3ecdf0d61d0e67cd4f72c29fee2c3c9a55
Add support for "with" statement

Creates data type scoped blocks which allow implicit member access to
the given expression or declaration statement.

with (expr) {
    ...;
}

Within the with-block the expression's members can be directly accessed
without the member access operator.
Members may hide local, class and instance varibales with the same name.
Instance variables are still accessible through this.
A local variable can be directly declared in the with statement header.
Hidden local and class variables are currently not directly accessible
(using this for class members generates the expected warning).

Fixes https://gitlab.gnome.org/GNOME/vala/issues/327

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: