config: fix warning
This commit is contained in:
parent
17ba209ed0
commit
6fa5250e1f
@ -10,8 +10,10 @@ abstract class Field[T] private (val default: Option[T])
|
||||
|
||||
abstract class View {
|
||||
final def apply[T](pname: Field[T]): T = apply(pname, this)
|
||||
final def apply[T](pname: Field[T], site: View): T = find(pname, site) match {
|
||||
case Some(x) => x.asInstanceOf[T]
|
||||
final def apply[T](pname: Field[T], site: View): T = {
|
||||
val out = find(pname, site)
|
||||
require (out.isDefined, s"Key ${pname} is not defined in Parameters")
|
||||
out.get
|
||||
}
|
||||
|
||||
final def lift[T](pname: Field[T]): Option[T] = lift(pname, this)
|
||||
|
Loading…
Reference in New Issue
Block a user