-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10080 from som-snytt/tweak/cleanup-nil-small-seq-…
…list Restore dealias Nil in Cleanup
- Loading branch information
Showing
14 changed files
with
139 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[[syntax trees at end of cleanup]] // newSource1.scala | ||
package <empty> { | ||
class C extends Object { | ||
def f0(): Seq = scala.collection.immutable.Nil.$asInstanceOf[Seq](); | ||
def f1(): Seq = scala.collection.immutable.Nil.$asInstanceOf[Seq](); | ||
def g(): Seq = scala.collection.immutable.Nil.$asInstanceOf[Seq](); | ||
def h(): Seq = scala.collection.immutable.Nil.$asInstanceOf[Seq](); | ||
def nil(): scala.collection.immutable.Nil.type = scala.collection.immutable.Nil; | ||
def <init>(): C = { | ||
C.super.<init>(); | ||
() | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
import scala.tools.partest._ | ||
|
||
object Test extends DirectTest { | ||
override def extraSettings: String = "-usejavacp -Vprint:cleanup" | ||
override def code = """ | ||
class C { | ||
def f0 = Seq(Nil: _*) | ||
def f1 = Seq.apply[String](Nil: _*) | ||
def g = Seq.apply[String](scala.collection.immutable.Nil: _*) | ||
def h = scala.collection.immutable.Seq.apply[String](scala.collection.immutable.Nil: _*) | ||
def nil = Nil | ||
} | ||
""" | ||
override def show() = assert(compile()) | ||
} | ||
|
||
/* | ||
was: | ||
def f0(): Seq = scala.`package`.Seq().apply(scala.`package`.Nil()).$asInstanceOf[Seq](); | ||
*/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.