]> 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>
Sat, 19 May 2018 20:52:40 +0000 (22:52 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=708693

compiler/valacompiler.vala

index 733db452642b66d3826d35a5f9bd0fd0998da5f5..c2f73c17e418ec1d4bc91446349ceb2f0eb4cb38 100644 (file)
@@ -468,6 +468,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