Skip to content

bug in function type parameter variance checking #1378

@gavinking

Description

@gavinking

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions