Avoid inline for slash apparently

This commit is contained in:
Eugene Yokota 2024-11-26 01:43:12 -05:00
parent 70d7ddb258
commit 320a8c7204
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ sealed trait Reference:
def /(configAxis: ScopeAxis[ConfigKey]): RefThenConfig =
RefThenConfig(asScope.copy(config = configAxis))
final def /[K](key: Scoped.ScopingSetting[K]): K = key.rescope(asScope)
final def /[K](key: Scoped.ScopingSetting[K]): K = asScope.scope(key)
final def /(key: AttributeKey[?]): Scope = asScope.rescope(key)
end Reference

View File

@ -76,11 +76,11 @@ object ScopeAxis:
/** Temporary data structure to capture first two axis using slash syntax. */
class RefThenConfig(val scope: Scope):
override def toString(): String = scope.toString()
inline def /[K](key: Scoped.ScopingSetting[K]): K = scope / key
def /[K](key: Scoped.ScopingSetting[K]): K = scope / key
inline def /(task: AttributeKey[?]): Scope = scope.copy(task = Select(task))
def /(task: AttributeKey[?]): Scope = scope.copy(task = Select(task))
/** This is for handling `Zero / Zero / Zero / name`. */
inline def /(taskAxis: ScopeAxis[AttributeKey[?]]): Scope = scope.copy(task = taskAxis)
def /(taskAxis: ScopeAxis[AttributeKey[?]]): Scope = scope.copy(task = taskAxis)
end RefThenConfig
end ScopeAxis