Skip to content

Instantly share code, notes, and snippets.

Eugene Burmako xeno-by

Block or report user

Report or block xeno-by

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am xeno-by on github.
  • I am xeno_by (https://keybase.io/xeno_by) on keybase.
  • I have a public key whose fingerprint is FA14 7F45 5509 FC4D 106C 13FA AB30 CC8E F90D C4A8

To claim this, I am signing this object:

View gist:41e342519d69d915cba799f9ba3eca9a
> publish
Generating Scalatex Sources...
[info] Resolving readme:readme_2.11:0.1-SNAPSHOT
[info] Resolution done
[info] Fetching artifacts
[info] Fetching artifacts: done
[info] Resolving org.scalameta:tokenizers_2.11:1.0.0-SNAPSHOT
[info] Resolution done
[info] Fetching artifacts
[info] Fetching artifacts: done
View gist:f888e6e92c3fbbea64c5efe8237f3d66
scala> 16:32 ~$ parse "x + (y)(z)"
[[syntax trees at end of parser]]// Scala source: tmpqW0GnW
package <empty> {
class wrapper extends scala.AnyRef {
def <init>() = {
super.<init>();
()
};
x.$plus(y(z))
}
View Boom.scala
import scala.language.experimental.macros
trait Foo[T]
object Foo {
implicit def materialize[T]: Foo[T] = macro Macros.impl[T]
}
@scala.annotation.implicitNotFound("boom")
trait Typeclass[T]
View gist:08015457a2b1cb542fb3
import scala.language.experimental.macros
trait Foo[T]
object Foo {
implicit def materialize[T]: Foo[T] = macro Macros.impl[T]
}
@scala.annotation.implicitNotFound("boom")
trait Typeclass[T]
View gist:4a18a8664bb4de6346a4
20:58 ~/Projects/2117/sandbox (HEAD)$ cat Test.scala
object Predef {
def blahblah: Int = ???
}
20:58 ~/Projects/2117/sandbox (HEAD)$ scalac Test.scala
20:58 ~/Projects/2117/sandbox (HEAD)$ ls -la
total 24
drwxr-xr-x 5 xeno_by staff 170 Oct 28 20:57 .
drwxr-xr-x 37 xeno_by staff 1258 Jul 30 14:47 ..
-rw-r--r-- 1 xeno_by staff 564 Oct 28 20:58 Predef$.class
View gist:d15abff9b77c1fba040b
val build = SbtBuild("/path/to/project/root")
val project = build.projects("some-project-name")
project.compile()
println(project.fullClasspath)
View gist:13f107c26981e2a30ab2
13:01 ~/Projects/scalahost/sandbox (master)$ s -Dconvert.debug
======= SCALA.REFLECT TREE =======
package test {
class Bar extends scala.AnyRef {
def <init>(): test.Bar = {
Bar.super.<init>();
()
}
};
class Foo extends Bar {
View gist:41ef87fd623425efcb9d
14:29 ~/Projects/scalahost/sandbox (master)$ cat Test.scala
package test
/** scaladoc for bar */
class Bar
/**
* Scaladoc for Foo class
*/
class Foo extends Bar {
View gist:d113ea78dfb7ee38ad6a
diff --git a/src/compiler/scala/tools/nsc/typechecker/Macros.scala b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
index 10aefae20b..1d09551244 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Macros.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
@@ -471,7 +471,7 @@ trait Macros extends MacroRuntimes with Traces with Helpers {
if (prefix == EmptyTree) macroDef.owner.tpe else prefix.tpe,
macroDef.owner)
} else
- targ.tpe
+ binding.targs(paramPos).tpe
You can’t perform that action at this time.