]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
compiler: Warn if --gir is used without --library
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 19 May 2018 20:52:40 +0000 (22:52 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 21 May 2018 16:21:26 +0000 (18:21 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=708693

compiler/valacompiler.vala

index 50caa0c02a84a9422853ba91e6ab66e996769fb9..0b80a07b0e65c8ed31c1e97f2cb0f034482de834 100644 (file)
@@ -447,6 +447,11 @@ class Vala.Compiler {
                        }
 
                        library = null;
+               } else {
+                       if (gir != null) {
+                               Report.warning (null, "--gir has no effect without --library");
+                               gir = null;
+                       }
                }
 
                // The GIRWriter places the gir_namespace and gir_version into the top namespace, so write the vapi after that stage