Skip to content

spec requires type checking of for-comprehension to consider refutability #1336

@scabug

Description

@scabug

The following only compiles with the 'filter' method, however it is never called:

  object Foo
  {
    def foreach( f : ((Int,Int)) => Unit ) 
    {
      println("foreach")
      f(1,2)
    }
//    def filter ( f : ((Int,Int)) => Boolean ) =
//    {
//      println("filter")
//      this
//    }
  
    for( (a,b) <- this )
    {
      println((a,b))
    }  
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions