Skip to content

Instantly share code, notes, and snippets.

@xeno-by
Created October 10, 2013 12:51
Show Gist options
  • Save xeno-by/6917825 to your computer and use it in GitHub Desktop.
Save xeno-by/6917825 to your computer and use it in GitHub Desktop.
14:51 ~/Projects/210x/sandbox (2.10.x)$ cat Async.scala
package scala {
package object async {
def apply[T](x: => T): T = x
}
}14:51 ~/Projects/210x/sandbox (2.10.x)$ kst
Test.scala:2: error: package scala.async is not a value
async(println("hello"))
^
[[syntax trees at end of typer]] // Test.scala
package <empty> {
object Test extends AnyRef with App {
def <init>(): Test.type = {
Test.super.<init>();
()
};
async(println("hello"))
}
}
one error found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment