Skip to content

Contextual return types for expression-bodied members #16044

@SLaks

Description

@SLaks
class C {
	partial A => new partial();
	async B => new async();
}

class partial {}
class async {}

The first line compiles; the second one does not.

Why not?
Why is async different from partial?

http://tryroslyn.azurewebsites.net/#b:master/f:>ilr/MYGwhgzhAEDC0G8BQBIADmATgFwJZhGgEFoBeAPmgDsBTAd2gx3xAAoBKAblUgE8rg0AEJlKtBnwEduAXyRJQkGEzwFEcxVGiTBCGUA=

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CompilersBugPedantic ;)Resolution-FixedThe bug has been fixed and/or the requested behavior has been implementedhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions