Skip to content

Commit

Permalink
Simplify Loc.Snippet.apply overload disambiguation
Browse files Browse the repository at this point in the history
  • Loading branch information
Naftoli Gugenheim authored and tuhlmann committed Jul 27, 2013
1 parent 1b65cca commit 024facf
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions web/webkit/src/main/scala/net/liftweb/sitemap/Loc.scala
Expand Up @@ -691,24 +691,11 @@ object Loc {
}

object Snippet {

/**
* A trait that does nothing other than allow the disabiguation of two different call-by-name parameters
* for apply()
*/
trait CallByNameDispatchSnippet

/**
* Vend the trait that does nothing other than allow the disabiguation of two different call-by-name parameters
* for apply()
*/
implicit def vendCallByNameDispatchSnippet: CallByNameDispatchSnippet = new CallByNameDispatchSnippet {}

/**
* Build a Loc.Snippet instance out of a name and a DispatchSnippet (or StatefulSnippet, LiftScreen or Wizard).
* The "render" method will be invoked on the Dispatch snippet
*/
def apply(name: String, snippet: => DispatchSnippet)(implicit disambiguate: CallByNameDispatchSnippet): Snippet =
def apply(name: String, snippet: => DispatchSnippet)(implicit disambiguate: DummyImplicit): Snippet =
new Snippet(name, ns => snippet.dispatch("render")(ns)) // Issue #919

/**
Expand Down

0 comments on commit 024facf

Please sign in to comment.