GNOME Bugzilla – Bug 732530
vala fails to detect format string errors when instantiating an error
Last modified: 2014-07-08 13:05:11 UTC
Given the following: public errordomain Foo { BAR } private static int main (string[] args) { try { throw new Foo.BAR ("Hello, %s", 1729); } catch (GLib.Error e) { GLib.error (e.message); } return 0; } Vala should emit an error message about "Cannot convert from `int' to `string'". It doesn't.
Created attachment 280007 [details] [review] Detect format string errors when instancing an error Fixes bug 732530
commit 7b6ee1be1e6b958a71911a6d5f5040e385a96a84 Author: Simon Werbeck <simon.werbeck@gmail.com> Date: Sun Jul 6 19:18:16 2014 +0200 Detect format string errors when instancing errors Fixes bug 732530 This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Good catch :) http://paldo.org:8010/builders/vala-master/builds/152/steps/geary/logs/stdio