-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from UdashFramework/diverging-implicits
Property implicits cleanup
- Loading branch information
Showing
17 changed files
with
611 additions
and
847 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
core/src/main/scala/io/udash/properties/HasModelPropertyCreator.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
package io.udash.properties | ||
|
||
abstract class HasModelPropertyCreator[T](implicit mpc: MacroModelPropertyCreator[T]) { | ||
/** | ||
* Use this constructor and pass `ModelPropertyCreator.materialize` explicitly if you're getting the | ||
* "super constructor cannot be passed a self reference unless parameter is declared by-name" error. | ||
*/ | ||
def this(creator: => ModelPropertyCreator[T]) = this()(MacroModelPropertyCreator(creator)) | ||
import com.avsystem.commons.meta.MacroInstances | ||
|
||
implicit val modelPropertyCreator: ModelPropertyCreator[T] = mpc.pc | ||
abstract class HasModelPropertyCreator[T](implicit instances: MacroInstances[Unit, () => ModelPropertyCreator[T]]) { | ||
implicit final lazy val modelPropertyCreator: ModelPropertyCreator[T] = instances((), this).apply() | ||
} |
Oops, something went wrong.