Set explicit return type for function _backend_instance
Inferred return type is Any, otherwise, not AbstractBackend.
This commit is contained in:
parent
43245b5eb5
commit
ffcdf986a3
@ -15,7 +15,11 @@ backends() = _backends
|
|||||||
|
|
||||||
"Returns the name of the current backend"
|
"Returns the name of the current backend"
|
||||||
backend_name() = CURRENT_BACKEND.sym
|
backend_name() = CURRENT_BACKEND.sym
|
||||||
_backend_instance(sym::Symbol)::AbstractBackend = haskey(_backendType, sym) ? _backendType[sym]() : error("Unsupported backend $sym")
|
|
||||||
|
function _backend_instance(sym::Symbol)::AbstractBackend
|
||||||
|
haskey(_backendType, sym) ? _backendType[sym]() : error("Unsupported backend $sym")
|
||||||
|
end
|
||||||
|
|
||||||
backend_package_name(sym::Symbol) = _backend_packages[sym]
|
backend_package_name(sym::Symbol) = _backend_packages[sym]
|
||||||
|
|
||||||
macro init_backend(s)
|
macro init_backend(s)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user