diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-06-16 19:28:24 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-02-19 13:29:33 +0100 |
commit | c16b665cb90c66c5ed8362fa70989bde1eaee272 (patch) | |
tree | 6728eb7f02af42ac98166f5f0961aff4ee30eb07 /tests | |
parent | c24a807efe5f06e04d6839a48521730d20769045 (diff) | |
download | vala-c16b665cb90c66c5ed8362fa70989bde1eaee272.tar.gz |
Add support for sealed classes in bindings
The "sealed" keyword was available and parsed for a long time. So simply
pick it up information and expose it in the AST.
Issue an error when it is used in vala source.
See https://gitlab.gnome.org/GNOME/vala/issues/278
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/objects/sealed-abstract-class.test | 7 | ||||
-rw-r--r-- | tests/objects/sealed-class.test | 10 | ||||
-rw-r--r-- | tests/objects/sealed-compact-class.test | 8 |
4 files changed, 28 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index e73bc0ac3..c10c72b41 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -385,6 +385,9 @@ TESTS = \ objects/property-simple-type-struct-nullable.vala \ objects/property-static.vala \ objects/regex.vala \ + objects/sealed-abstract-class.test \ + objects/sealed-class.test \ + objects/sealed-compact-class.test \ objects/signals.vala \ objects/signals-enum-marshal.vala \ objects/signals-delegate.vala \ diff --git a/tests/objects/sealed-abstract-class.test b/tests/objects/sealed-abstract-class.test new file mode 100644 index 000000000..337820a04 --- /dev/null +++ b/tests/objects/sealed-abstract-class.test @@ -0,0 +1,7 @@ +Invalid Code + +sealed abstract class Foo { +} + +void main () { +} diff --git a/tests/objects/sealed-class.test b/tests/objects/sealed-class.test new file mode 100644 index 000000000..b5ec1f052 --- /dev/null +++ b/tests/objects/sealed-class.test @@ -0,0 +1,10 @@ +Invalid Code + +sealed class Foo { +} + +class Bar : Foo { +} + +void main () { +} diff --git a/tests/objects/sealed-compact-class.test b/tests/objects/sealed-compact-class.test new file mode 100644 index 000000000..006c7fc02 --- /dev/null +++ b/tests/objects/sealed-compact-class.test @@ -0,0 +1,8 @@ +Invalid Code + +[Compact] +sealed class Foo { +} + +void main () { +} |