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 776829 - [Genie] Allow empty classes
[Genie] Allow empty classes
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Genie
unspecified
Other All
: Normal normal
: ---
Assigned To: Jamie McCracken
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-03 18:19 UTC by Al Thomas
Modified: 2018-05-22 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix it. (2.08 KB, patch)
2017-06-15 21:34 UTC, Vladislav
none Details | Review
tests to patch (1.10 KB, patch)
2017-06-15 21:45 UTC, Vladislav
none Details | Review

Description Al Thomas 2017-01-03 18:19:16 UTC
In Vala the following compiles:

void main () {
  new Test ();
}
class Test {
}

In Genie the following:

init
	pass
class Test
	pass

produces the error:
test.gs:4.2-4.5: error: syntax error, expected declaration  but got `pass' with previous `tab indent'

Empty classes are useful for stubbing classes during development.
Comment 1 Vladislav 2017-06-15 21:34:33 UTC
Created attachment 353861 [details] [review]
Patch to fix it.
Comment 2 Vladislav 2017-06-15 21:45:27 UTC
Created attachment 353862 [details] [review]
tests to patch

Here are tests for empty classes.
To run them, please use "run_genie_tests.py" file from "genie-improved" branch from here:
https://github.com/vlad1777d/Genie/tree/genie-improved

Also this changes can be cherry-picked from "empty_classes" branch:
https://github.com/vlad1777d/Genie/tree/empty_classes
, which is build on the basis of lastest "master" branch.
(see last 2 commits)
Comment 3 GNOME Infrastructure Team 2018-05-22 15:42:01 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/566.