Bug 54991 - Cannot compile get => _text
Summary: Cannot compile get => _text
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 4.8.0 (C9)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2017-04-11 01:18 UTC by Grief
Modified: 2017-05-22 21:33 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Grief 2017-04-11 01:18:39 UTC
Compilation of getters and setters with expression-ed bodies fails even if LangVersion is set to 6.
public string SomeProperty
    get => _text;
    set => _text = value;
error CS1043: Invalid accessor body `=>', expecting `;' or `{'
error CS1043: Invalid accessor body `=>', expecting `;' or `{'
Comment 1 Grief 2017-04-12 11:47:11 UTC
Can you please tell at least is it an expected behaviour, bug or 'feature'?
Comment 2 Marek Safar 2017-05-22 21:33:44 UTC
Fixed in master and 2017-04 mono