bug icon indicating copy to clipboard operation
bug copied to clipboard

don't create static forwarders for foo$extension.

Open scabug opened this issue 12 years ago • 3 comments

What else should be omitted?

Targetting to 2.11 for reasons of binary compatibility.

scabug avatar Jan 16 '13 17:01 scabug

Imported From: https://issues.scala-lang.org/browse/SI-6983?orig=1 Reporter: @retronym Affected Versions: 2.11.0-M2

scabug avatar Jan 16 '13 17:01 scabug

@retronym said: My read of the situation is that the generated extension methods should be flagged as ARTIFACT, and the backend should add this to the excluded flag set.

I also notice the trait setter methods generate static forwarders.

Some more evidence for the ARTIFACT flag (yeah, I know that it doesn't quite count as a bug if you have to type '$'):

% cat test.scala
class Box1(val x: T) extends AnyVal {
  def foo = 0
}

% scalac test.scala

% scala

scala> Box1
res0: Box1.type = Box1$@7556cd93

scala> Box1.foo$extension _
res2: Box1 => Int = <function1>

scabug avatar Jan 16 '13 23:01 scabug

@retronym said: WIP https://github.com/retronym/scala/compare/ticket/6983

scabug avatar Jan 18 '13 23:01 scabug