Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too loose type signature in 'AnyChromosome.of' method #256

Closed
jenetics opened this issue Sep 1, 2017 · 2 comments
Closed

Too loose type signature in 'AnyChromosome.of' method #256

jenetics opened this issue Sep 1, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@jenetics
Copy link
Owner

jenetics commented Sep 1, 2017

The type constraints of the factory method AnyChromosome.of are too loose.

public static <A> AnyChromosome<A> of
    final Supplier<? extends A> supplier,
    final Predicate<? super A> alleleValidator,
    final Predicate<? super ISeq<? super A>> alleleSeqValidator,
    final int length
)

should be

public static <A> AnyChromosome<A> of
    final Supplier<? extends A> supplier,
    final Predicate<A> alleleValidator,
    final Predicate<ISeq<A>> alleleSeqValidator,
    final int length
)
@jenetics jenetics added the bug label Sep 1, 2017
@jenetics jenetics added this to the v4.0.0 milestone Sep 1, 2017
@jenetics jenetics self-assigned this Sep 1, 2017
@jenetics
Copy link
Owner Author

jenetics commented Oct 2, 2017

Actually change the factory method signature to

	public static <A> AnyChromosome<A> of(
		final Supplier<? extends A> supplier,
		final Predicate<? super A> alleleValidator,
		final Predicate<? super ISeq<A>> alleleSeqValidator,
		final int length
	)

jenetics added a commit that referenced this issue Oct 2, 2017
…signature

#256: Fix signature of 'AnyChromosome.of' methods.
@jenetics
Copy link
Owner Author

jenetics commented Oct 2, 2017

Merged into r4.0.0 branch.

@jenetics jenetics closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant