Skip to content

Better handling of higher-order functions #1

@dragos

Description

@dragos

Function literals may confuse the plugin. For instance,

  val xs = List(1, 2, 3)
  xs map (x => x)

is translated to

  val xs = List(1, 2, 3)
  xs map (new anonfun extends AbstractFunction1$II {
    def apply(x: Object) = apply(x.toInt) // boxing
    def apply(x: Int) = x
  })

but, if map is specialized, no boxing will occur (the apply(Object) overload is never called).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions