Created
July 26, 2021 21:22
-
-
Save otobrglez/85a6421a1afe89398fb35e44c3c17db2 to your computer and use it in GitHub Desktop.
HelloWorld2 (jcdang example)
This file contains hidden or 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
[[syntax trees at end of parser]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: _root_.scala.Function1[Int, Int] = ((x$1) => x$1.$plus(2)); | |
println(StringContext("Hello world! This is Scala. ", "").s(add2(40))) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of namer]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: _root_.scala.Function1[Int, Int] = ((x$1) => x$1.$plus(2)); | |
println(StringContext("Hello world! This is Scala. ", "").s(add2(40))) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of packageobjects]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: _root_.scala.Function1[Int, Int] = ((x$1) => x$1.$plus(2)); | |
println(StringContext("Hello world! This is Scala. ", "").s(add2(40))) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of typer]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = ((x$1: Int) => x$1.+(2)); | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of superaccessors]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = ((x$1: Int) => x$1.+(2)); | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of extmethods]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = ((x$1: Int) => x$1.+(2)); | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of pickler]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = ((x$1: Int) => x$1.+(2)); | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of refchecks]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = ((x$1: Int) => x$1.+(2)); | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of patmat]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends scala.AnyRef { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = ((x$1: Int) => x$1.+(2)); | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of uncurry]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = { | |
final <artifact> def $anonfun$main(x$1: Int): Int = x$1.+(2); | |
((x$1: Int) => $anonfun$main(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of fields]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = { | |
final <artifact> def $anonfun$main(x$1: Int): Int = x$1.+(2); | |
((x$1: Int) => $anonfun$main(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of tailcalls]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = { | |
final <artifact> def $anonfun$main(x$1: Int): Int = x$1.+(2); | |
((x$1: Int) => $anonfun$main(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of specialize]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = { | |
final <artifact> def $anonfun$main(x$1: Int): Int = x$1.+(2); | |
((x$1: Int) => $anonfun$main(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply$mcII$sp(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of explicitouter]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = { | |
final <artifact> def $anonfun$main(x$1: Int): Int = x$1.+(2); | |
((x$1: Int) => $anonfun$main(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(add2.apply$mcII$sp(40)): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of erasure]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
final <artifact> def $anonfun$main(x$1: Int): Int = x$1.+(2); | |
((x$1: Int) => $anonfun$main(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of posterasure]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
final <artifact> def $anonfun$main(x$1: Int): Int = x$1.+(2); | |
((x$1: Int) => $anonfun$main(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of lambdalift]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
}; | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
((x$1: Int) => HelloWorld2.this.$anonfun$main$1(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
}; | |
final <artifact> private[this] def $anonfun$main$1(x$1: Int): Int = x$1.+(2) | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of constructors]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
((x$1: Int) => HelloWorld2.this.$anonfun$main$1(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
}; | |
final <artifact> private[this] def $anonfun$main$1(x$1: Int): Int = x$1.+(2); | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of flatten]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
((x$1: Int) => HelloWorld2.this.$anonfun$main$1(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
}; | |
final <artifact> private[this] def $anonfun$main$1(x$1: Int): Int = x$1.+(2); | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of mixin]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
((x$1: Int) => HelloWorld2.this.$anonfun$main$1(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
}; | |
final <artifact> private[this] def $anonfun$main$1(x$1: Int): Int = x$1.+(2); | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of cleanup]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
((x$1: Int) => HelloWorld2.this.$anonfun$main$1(x$1)) | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
}; | |
final <artifact> private[this] def $anonfun$main$1(x$1: Int): Int = x$1.+(2); | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of delambdafy]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
$anonfun() | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
}; | |
final <static> <artifact> def $anonfun$main$1(x$1: Int): Int = x$1.+(2); | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
} | |
} | |
} | |
This file contains hidden or 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
[[syntax trees at end of jvm]] // HelloWorld2.scala | |
package <empty> { | |
object HelloWorld2 extends Object { | |
def main(args: Array[String]): Unit = { | |
val add2: Function1 = { | |
$anonfun() | |
}; | |
scala.Predef.println(("Hello world! This is Scala. ".+(scala.Int.box(add2.apply$mcII$sp(40))): String)) | |
}; | |
final <static> <artifact> def $anonfun$main$1(x$1: Int): Int = x$1.+(2); | |
def <init>(): HelloWorld2.type = { | |
HelloWorld2.super.<init>(); | |
() | |
} | |
} | |
} | |
This file contains hidden or 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
object HelloWorld2 { | |
def main(args: Array[String]): Unit = { | |
val add2: Int => Int = _ + 2 | |
println(s"Hello world! This is Scala. ${add2(40)}") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment