mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-07 16:29:07 -04:00
Compare commits
2 commits
fa93f9526c
...
79e3e4d8ab
Author | SHA1 | Date | |
---|---|---|---|
|
79e3e4d8ab | ||
|
55e5095fba |
3 changed files with 16 additions and 0 deletions
|
@ -519,6 +519,14 @@ class ArrayValue(AstNode):
|
||||||
range=quoted_literal.range,
|
range=quoted_literal.range,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
elif isinstance(value.child, Translated):
|
||||||
|
errors.append(
|
||||||
|
CompileError(
|
||||||
|
"Arrays can't contain translated strings",
|
||||||
|
range=value.child.range,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
if len(errors) > 0:
|
if len(errors) > 0:
|
||||||
raise MultipleErrors(errors)
|
raise MultipleErrors(errors)
|
||||||
|
|
||||||
|
|
7
tests/sample_errors/translated_string_array.blp
Normal file
7
tests/sample_errors/translated_string_array.blp
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
using Gtk 4.0;
|
||||||
|
|
||||||
|
StringList {
|
||||||
|
strings: [
|
||||||
|
_("Test")
|
||||||
|
];
|
||||||
|
}
|
1
tests/sample_errors/translated_string_array.err
Normal file
1
tests/sample_errors/translated_string_array.err
Normal file
|
@ -0,0 +1 @@
|
||||||
|
5,5,9,Arrays can't contain translated strings
|
Loading…
Add table
Add a link
Reference in a new issue