Instantly share code, notes, and snippets.

View test.scala
class Test {
trait C; trait C1 extends C; trait C1A extends C1; trait C1B extends C1; trait C2 extends C; trait C2A extends C2; trait C2B extends C2; trait C12A extends C1A with C2A; class C12B extends C1B with C2B
trait C3 extends C; trait C3A extends C3; trait C3B extends C3; trait C4 extends C; trait C4A extends C4; trait C4B extends C4; trait C34A extends C3A with C4A; class C34B extends C3B with C4B
trait C5 extends C; trait C5A extends C5; trait C5B extends C5; trait C6 extends C; trait C6A extends C6; trait C6B extends C6; trait C56A extends C5A with C6A; class C56B extends C5B with C6B
class D
val x: Map[AnyRef, Seq[Class[_ <: C]]] = {
Map(
"" -> Seq(classOf[C1], classOf[C1A]),
"" -> Seq(classOf[C1], classOf[C1A], classOf[C12B]),
"" -> Seq(classOf[C1], classOf[C1A]),
View hotspot-SIGBUS-8.0_172-b11-GCTaskThread.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0xa) at pc=0x000000010a3ab78e, pid=72782, tid=0x0000000000003003
#
# JRE version: Java(TM) SE Runtime Environment (8.0_172-b11) (build 1.8.0_172-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.172-b11 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x1ab78e] oopDesc::size()+0x1e
#
View gist:be3df0c6fe6be7c610571cafc3a57f6c
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0xa) at pc=0x000000010a3ab78e, pid=72782, tid=0x0000000000003003
#
# JRE version: Java(TM) SE Runtime Environment (8.0_172-b11) (build 1.8.0_172-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.172-b11 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x1ab78e] oopDesc::size()+0x1e
#
View ArgsFile.scala
package io.github.retronym
import sbt._
import Keys._
object SbtArgsFilePlugin extends AutoPlugin {
override def trigger = allRequirements
override def requires = sbt.plugins.JvmPlugin
val argsFileContents = taskKey[String]("Contents of file suitable for `scalac @args.txt`")
val argsFile = taskKey[Unit]("Write compiler command line into an args file suitable for `scalac @target/compile.args`")
View RawCompile.scala
package io.github.retronym
import sbt._
import Keys._
object RawCompile extends AutoPlugin {
override def trigger = allRequirements
override def requires = sbt.plugins.JvmPlugin
val compileRaw = taskKey[Unit]("Compile directly, bypassing the incremental compiler")
val cleanClasses = taskKey[Unit]("clean the classes directory")
View pr-7089.diff
This file has been truncated, but you can view the full file.
diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF
index 8ae5bf8..349c47c 100644
--- a/META-INF/MANIFEST.MF
+++ b/META-INF/MANIFEST.MF
@@ -1,345 +1,5164 @@
Manifest-Version: 1.0
-Automatic-Module-Name: scala.tools.nsc
-Bnd-LastModified: 1534596208290
+Automatic-Module-Name: scala.library
View pr-7089.diff
This file has been truncated, but you can view the full file.
diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF
index 09c208f..aa1deaa 100644
--- a/META-INF/MANIFEST.MF
+++ b/META-INF/MANIFEST.MF
@@ -1,75 +1,5164 @@
Manifest-Version: 1.0
-Automatic-Module-Name: scala.reflect
-Bnd-LastModified: 1534596081575
+Automatic-Module-Name: scala.library
View gist:0bd4e9f14ce55d0c1b296f1542dd83dc
scala> def impl[T: c.WeakTypeTag](c: Context): c.Tree = { import c.universe._, definitions._; val tpe = c.weakTypeOf[T]; q"$PredefModule.classOf[$tpe]"}
impl: [T](c: scala.reflect.macros.blackbox.Context)(implicit evidence$1: c.WeakTypeTag[T])c.Tree
scala> def clazzOf[T]: Class[_] = macro impl[T]
defined term macro clazzOf: [T]=> Class[_]
scala> classOf[String]
res1: Class[String] = class java.lang.String
View gist:815c16eb7c2538ff2ba9d7508670bbc9
$ cat sandbox/test.scala; scalac -Yshow-trees -Xprint:typer sandbox/test.scala
trait T {
private[this] var foo = 42;
}
class C {
private[this] var foo = 42;
}
[[syntax trees at end of typer]]// Scala source: test.scala
View profile.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.