Skip to content

Improve type inferencing for Spock expect block #917

@eric-milles

Description

@eric-milles

Consider the following:

class Foo {
  String bar
}
final class FooTest exteds spock.lang.Specification {
  void 'test case'() {
   given:
    Foo foo = new Foo(bar: 42)
   expect:
    foo.bar == 42
  }
}

If the Spock global transform is enabled (soon it will always be enabled: #814), "bar" is showing as unknown (underlined).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions