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 790903 - Invalid instance member access to properties/fields
Invalid instance member access to properties/fields
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Semantic Analyzer
0.39.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-27 14:18 UTC by Rico Tzschichholz
Modified: 2018-05-22 15:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
codegen: Discover invalid member access to instance field (2.04 KB, patch)
2017-11-27 14:35 UTC, Rico Tzschichholz
committed Details | Review

Description Rico Tzschichholz 2017-11-27 14:18:26 UTC
Statically accessing fields results in broken ccode while for properties at least an improper error is thrown.

class Foo {
	public string field;
	public string property { get; set; }
}

void main () {
	string foo

	foo = Foo.field;
	foo = Foo.property;
}
Comment 1 Rico Tzschichholz 2017-11-27 14:35:32 UTC
Created attachment 364503 [details] [review]
codegen: Discover invalid member access to instance field
Comment 2 Rico Tzschichholz 2017-11-28 07:35:50 UTC
Comment on attachment 364503 [details] [review]
codegen: Discover invalid member access to instance field

Attachment 364503 [details] pushed as 2f6d9c4 - codegen: Discover invalid member access to instance field
Comment 3 GNOME Infrastructure Team 2018-05-22 15:57:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/605.