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

bug in function type parameter variance checking #1378

Open
gavinking opened this issue Jul 9, 2015 · 1 comment
Open

bug in function type parameter variance checking #1378

gavinking opened this issue Jul 9, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@gavinking
Copy link
Member

The typechecker accepts this:

shared Boolean isInsideInterval<out Value>
        ([Value, Value] interval)(Value x)
        given Value satisfies Comparable<Value> 
        => let ([a,b]=interval) a <= x <= b;

That's inconsistent, since Value occurs contravariantly in the return type.

@gavinking gavinking added the bug label Jul 9, 2015
@gavinking gavinking self-assigned this Jul 9, 2015
@gavinking gavinking added this to the 1.2 milestone Jul 9, 2015
gavinking added a commit that referenced this issue Jul 20, 2015
@gavinking
Copy link
Member Author

This is pretty harmless and fixing it is too much of a PITA to bother with it for 1.2. I have added a comment indicating where the fix should go.

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