Skip to content

Instantly share code, notes, and snippets.

@mpollmeier
Created January 21, 2020 01:20
Show Gist options
  • Save mpollmeier/7d55104537ab228b759e1d50353ce557 to your computer and use it in GitHub Desktop.
Save mpollmeier/7d55104537ab228b759e1d50353ce557 to your computer and use it in GitHub Desktop.
class Foo
implicit class FooExt(val foo: Foo) extends AnyVal {
def bar = 42
}
// usage
val foo = new Foo
foo.bar // will not allocate FooExt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment