Skip to content

Incorrect collapse of expression bodied member with compiler directive #76820

@lonix1

Description

@lonix1

I'm unsure which repo this belong in?

This collapses properly:

public class Demo1 {

  public int Foo() {
    return
    #if DEBUG
    10;
    #else
    20;
    #endif
  }

}

This does not:

public class Demo2 {

  public int Foo() =>
    #if DEBUG
    10;
    #else
    20;
    #endif

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type

    Projects

    Status

    Completed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions