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

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


Attachments

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

Note You need to log in before you can comment on or make changes to this bug.