Skip to content

coverage analysis should take into account enumerated bounds #1278

@gavinking

Description

@gavinking

The typechecker should accept this code:

T fun<T>(T x, T y) 
        given T of Float|Integer {
    switch (pair = [x,y])
    case (is [Integer,Integer]) { return pair[0]+pair[1]; }
    case (is [Float,Float]) { return pair[0]+pair[1]; }
}

I'm not sure how hard this is.

Related: #560.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions