Skip to content

Instantly share code, notes, and snippets.

@kmizu
Created June 16, 2010 11:57
Show Gist options
  • Save kmizu/440566 to your computer and use it in GitHub Desktop.
Save kmizu/440566 to your computer and use it in GitHub Desktop.
def foo() { println("foo") }
class A {
def bar() {
foo
}
}
new A().bar()
object Main {
def main(args: Array[String]): Unit = {
final class $anon extends scala.AnyRef {
def foo(): Unit = scala.this.Predef.println("foo");
class A {
def bar(): Unit = $anon.this.foo()
}
new $anon.this.A().bar()
}
new $anon();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment