Skip to content

Add @NamedParam support for constructors #637

@eric-milles

Description

@eric-milles

DSLD support was added for NamedVariant, etc. on methods. Support for the same on constructors needs to be added.

Consider the following:

import groovy.transform.NamedVariant

class Color {
  int r, g, b
  @NamedVariant
  Color(int r, int g, int b) {
    this.r = r
    this.g = g
    this.b = b
  }
}

def color = new Color(r: 0, |)

Content assist at | should include proposals for "b : __ - int named parameter of Color" and "g : __ - int named parameter of Color".

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions