After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792254 - Vala compiler should detect wrong compact classes declarations
Vala compiler should detect wrong compact classes declarations
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Semantic Analyzer
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 607568 659278 741465
Blocks:
 
 
Reported: 2018-01-05 20:34 UTC by Daniel Espinosa
Modified: 2018-03-27 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Espinosa 2018-01-05 20:34:32 UTC
Documentation is clear about how to use Compact Classes, so compiler should detect and rise errors for common wrong uses:

a) Report an error on abstract compact classes declaration (#741465)
b) Report an error on trying to declare a virtual/abstract methods (#659278, #741465)
c) Report an error on trying to declare automatic properties declaration (#607568)

This bug report closes bug #741465.
Comment 1 Daniel Espinosa 2018-01-05 21:25:08 UTC
Automatic properties, are allowed but they provide a body and use public fields in the compact class. Internal fields with references are allowed see:

https://bugzilla.gnome.org/show_bug.cgi?id=607568#c6

So all these should be documented in a section for compact classes and producing C API for libraries.
Comment 2 Rico Tzschichholz 2018-01-06 14:15:14 UTC
@daniel: Are you going to work on that?
Comment 3 Rico Tzschichholz 2018-03-27 10:35:28 UTC
Afaics the mentioned problems are taken care of, so this can be closed.