From: Rico Tzschichholz Date: Mon, 18 Oct 2021 07:19:07 +0000 (+0200) Subject: tests: Add "instance access to implicit to_string() method of enum" test X-Git-Tag: 0.55.1~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e336f272c62c1603945839c810c39a74c2e2a8b;p=thirdparty%2Fvala.git tests: Add "instance access to implicit to_string() method of enum" test --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 904ae9739..3ea602a23 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -335,6 +335,7 @@ TESTS = \ enums/in-invalid.test \ enums/no_gtype_to_string.vala \ enums/switch.vala \ + enums/bug614424.vala \ enums/bug666035.vala \ enums/bug666035-1.test \ enums/bug666035-2.test \ diff --git a/tests/enums/bug614424.vala b/tests/enums/bug614424.vala new file mode 100644 index 000000000..7312eed0b --- /dev/null +++ b/tests/enums/bug614424.vala @@ -0,0 +1,11 @@ +enum Foo { + BAR; + + public string bar () { + return to_string (); + } +} + +void main () { + assert (Foo.BAR.bar () == "FOO_BAR"); +}