mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
validation: Disallow instantiating abstract classes
This commit is contained in:
parent
f78478bea1
commit
99e428d93c
17 changed files with 35 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Widget {
|
||||
Button {
|
||||
accessibility {
|
||||
not_a_prop: "Hello, world!";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Widget {
|
||||
Button {
|
||||
accessibility {
|
||||
labelled-by: not_an_object;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Widget {
|
||||
Button {
|
||||
accessibility {
|
||||
orientation: 1;
|
||||
}
|
||||
|
|
4
tests/sample_errors/abstract_class.blp
Normal file
4
tests/sample_errors/abstract_class.blp
Normal file
|
@ -0,0 +1,4 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template MyWidget : Gtk.Widget {}
|
||||
Gtk.Widget {}
|
1
tests/sample_errors/abstract_class.err
Normal file
1
tests/sample_errors/abstract_class.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,1,10,Gtk.Widget can't be instantiated because it's abstract
|
|
@ -1 +1 @@
|
|||
4,3,15,Cannot assign Gio.MenuModel to string
|
||||
4,3,15,Cannot assign Gio.Menu to string
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Widget {
|
||||
Button {
|
||||
mime-types []
|
||||
patterns []
|
||||
suffixes []
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
4,3,13,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties
|
||||
5,3,11,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties
|
||||
6,3,11,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties
|
||||
4,3,13,Gtk.Button is not a Gtk.FileFilter, so it doesn't have file filter properties
|
||||
5,3,11,Gtk.Button is not a Gtk.FileFilter, so it doesn't have file filter properties
|
||||
6,3,11,Gtk.Button is not a Gtk.FileFilter, so it doesn't have file filter properties
|
||||
|
|
|
@ -6,4 +6,4 @@ StringList {
|
|||
]
|
||||
}
|
||||
|
||||
Widget id {}
|
||||
Button id {}
|
||||
|
|
|
@ -1 +1 @@
|
|||
5,5,2,Cannot assign Gtk.Widget to string
|
||||
5,5,2,Cannot assign Gtk.Button to string
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Widget {
|
||||
Button {
|
||||
widgets []
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
4,3,7,Gtk.Widget is not a Gtk.SizeGroup, so it doesn't have size group properties
|
||||
4,3,7,Gtk.Button is not a Gtk.SizeGroup, so it doesn't have size group properties
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue