spockframework / spockframework/spock

Special case type constraint to just _ (underscore)

Open
#498 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Module-Core Type-NewFeature
Dominant language
Java
Stars
3.6k
Forks
483
PR merge metrics
No merged PRs in 30d

Description

Originally reported on Google Code with ID 376

`as Foo` has a special meaning in an argument constraint, namely “argument of type Foo".
The common way to use it is `_ as Set` (“any argument of type Foo”). Perhaps we should
limit the special meaning to `_`, as I don't see much value in mixing a type constraint
with equality or closure constraints. (from pniederw@gmail.com)

Reported by quidryan on 2014-10-13 04:26:55

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the argument-constraint handling and existing coverage for _ as Set and mixed type, equality, or closure constraints. Done means the supported special-case behavior is agreed and verified by regression tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.