You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building this will result in over 2000 errors, mostly pertaining to redefinitions. After doing this I gained a better understanding of what I was actually asking the compiler to do and it's clear that what I was asking it to do is stupid, but I feel like this might be an opportunity for the compiler to fail early. One error message stating "Attempt to re-include header 'gtk/gtk.h' in the same scope" would be better than 2000 symptoms of the root problem.
The text was updated successfully, but these errors were encountered:
It would make more sense to be duplicate @cImport detection rather than @cInclude duplication: sometimes you have libraries where you include the same header multiple times with different defines set.
That said, I don't know if this should be an error. Two unrelated zig libraries might @cimport the same C library. There is no reason for that to be an error.
This isn't a bug per se. Take the scenario:
a.zig
b.zig
Building this will result in over 2000 errors, mostly pertaining to redefinitions. After doing this I gained a better understanding of what I was actually asking the compiler to do and it's clear that what I was asking it to do is stupid, but I feel like this might be an opportunity for the compiler to fail early. One error message stating "Attempt to re-include header 'gtk/gtk.h' in the same scope" would be better than 2000 symptoms of the root problem.
The text was updated successfully, but these errors were encountered: