Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | vala: Add support for type narrowing | Rico Tzschichholz | 2020-11-11 | 1 | -0/+58 |
This causes type of given variable to be narrowed for the correspoding child block of an if-statement. Foo foo = ...; if (foo is Bar) { // foo represents a non-null Bar instance inside this block } This makes conditional-expressions behaving similar. ... = (foo is Bar) ? "foo is instance of Bar here" : "..."; Fixes https://gitlab.gnome.org/GNOME/vala/issues/894 |