diff options
author | Garrett Regier <garrett.regier@riftio.com> | 2015-10-04 12:17:40 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-10-04 12:17:55 -0400 |
commit | 849f1eef10b18eddaf41c1e0b2cca87bf5d93739 (patch) | |
tree | d36ede7d5b8879699e0a3c391b89a8f4263c456a /tests/warn/invalid-nullable.h | |
parent | 2699d5116ab5aaf801521c0f6c96bda09a23fb15 (diff) | |
download | gobject-introspection-849f1eef10b18eddaf41c1e0b2cca87bf5d93739.tar.gz |
scanner: Warn and ignore on incorrect optional/nullable/allow-none annotations
These can easily be misunderstood, especially optional.
https://bugzilla.gnome.org/show_bug.cgi?id=752065
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
Diffstat (limited to 'tests/warn/invalid-nullable.h')
-rw-r--r-- | tests/warn/invalid-nullable.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/warn/invalid-nullable.h b/tests/warn/invalid-nullable.h new file mode 100644 index 00000000..8a9174ab --- /dev/null +++ b/tests/warn/invalid-nullable.h @@ -0,0 +1,14 @@ +#include "common.h" + +/** + * test_invalid_nullable: + * @param: (nullable): + * @param2: (nullable): + * + * Returns: (nullable): + */ +int test_invalid_nullable(int param, GType param2); + +// EXPECT:5: Warning: Test: invalid "nullable" annotation: only valid for pointer types and out parameters +// EXPECT:6: Warning: Test: invalid "nullable" annotation: only valid for pointer types and out parameters +// EXPECT:8: Warning: Test: invalid "nullable" annotation: only valid for pointer types and out parameters |