summaryrefslogtreecommitdiff
path: root/tests/objects/type-narrowing.vala
Commit message (Collapse)AuthorAgeFilesLines
* vala: Add support for type narrowingRico Tzschichholz2020-11-111-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