Skip to content

equals_value_clause replaced with '=' after 0.20.x? #396

@danielgindi

Description

@danielgindi

In 0.20.0, this line:

        public const string PromotionClientApi = nameof(PromotionClientApi);

Emitted this:

[ {
  "type" : "modifier",
  "text" : "public"
}, {
  "type" : "modifier",
  "text" : "const"
}, {
  "type" : "variable_declaration",
  "text" : "string PromotionClientApi = nameof(PromotionClientApi)",
  "children": [ {
      "type" : "predefined_type",
      "text" : "string"
    }, {
      "type" : "variable_declarator",
      "text" : "PromotionClientApi = nameof(PromotionClientApi)",
      "children": [ {
          "type" : "identifier",
          "text" : "PromotionClientApi"
        }, {
          "type" : "equals_value_clause",
          "text" : "= nameof(PromotionClientApi)",
          "children": [ {
              "type" : "=",
              "text" : "="
            }, {
              "type" : "invocation_expression",
              "text" : "nameof(PromotionClientApi)"
            } ]
        } ]
    } ]
}, {
  "type" : ";",
  "text" : ";"
} ]

After upgrading to any later version, it emits this:

[ {
  "type" : "modifier",
  "text" : "public"
}, {
  "type" : "modifier",
  "text" : "const"
}, {
  "type" : "variable_declaration",
  "text" : "string PromotionClientApi = nameof(PromotionClientApi)",
  "children": [ {
      "type" : "predefined_type",
      "text" : "string"
    }, {
      "type" : "variable_declarator",
      "text" : "PromotionClientApi = nameof(PromotionClientApi)",
      "children": [ {
          "type" : "identifier",
          "text" : "PromotionClientApi"
        }, {
          "type" : "=",
          "text" : "="
        }, {
          "type" : "invocation_expression",
          "text" : "nameof(PromotionClientApi)"
        } ]
    } ]
}, {
  "type" : ";",
  "text" : ";"
} ]

However I couldn't find any doc about this. Is this expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions