diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-01-18 14:33:15 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-01-18 14:41:03 +0100 |
commit | 8c72e14117f474bb657ecb3bde2efc352e9a164c (patch) | |
tree | 0544b5a2515554f70c4b75ab87583e34d37a2dff /tests/parser | |
parent | 78da97b73e4f4f0c82e8fe3fe81ba9971c999e06 (diff) | |
download | vala-8c72e14117f474bb657ecb3bde2efc352e9a164c.tar.gz |
parser: Reduce the source reference of main block method to its beginning
The end contains broken information which lead to a crash while trying to
report this multi-line source reference.
Diffstat (limited to 'tests/parser')
-rw-r--r-- | tests/parser/main-block-minimal.c-expected | 21 | ||||
-rw-r--r-- | tests/parser/main-block-minimal.vala | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/parser/main-block-minimal.c-expected b/tests/parser/main-block-minimal.c-expected new file mode 100644 index 000000000..a8b8a94dc --- /dev/null +++ b/tests/parser/main-block-minimal.c-expected @@ -0,0 +1,21 @@ +/* parser_main_block_minimal.c generated by valac, the Vala compiler + * generated from parser_main_block_minimal.vala, do not modify */ + +#include <glib.h> + +static void _vala_main (void); + +static void +_vala_main (void) +{ + g_print ("foo"); +} + +int +main (int argc, + char ** argv) +{ + _vala_main (); + return 0; +} + diff --git a/tests/parser/main-block-minimal.vala b/tests/parser/main-block-minimal.vala new file mode 100644 index 000000000..d029e43fa --- /dev/null +++ b/tests/parser/main-block-minimal.vala @@ -0,0 +1 @@ +print ("foo"); |