Skip to content

Commit f08a644

Browse files
committed
Fix @noinline for 1.6
1 parent 29677bd commit f08a644

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ArrayInterface.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,12 +1059,18 @@ each index along `dim` of `x`.
10591059
$INDEX_LABELS_EXTENDED_HELP
10601060
"""
10611061
function index_labels(x::T) where {T}
1062-
has_index_labels(T) || (@noinline; throw(ArgumentError("Objects of type $T do not support `index_labels`")))
1063-
is_forwarding_wrapper(T) || (@noinline; throw(ArgumentError("`has_index_labels($(T)) == true` but does not have `ArrayInterface.index_labels(::$T)` defined.")))
1062+
has_index_labels(T) || _throw_index_labels(T)
1063+
is_forwarding_wrapper(T) || _violated_index_label_interface(T)
10641064
return index_labels(parent(x))
10651065
end
10661066
index_labels(x, dim::Integer) = index_labels(x)[Int(dim)]
10671067

1068+
@noinline function _throw_index_labels(T::DataType)
1069+
throw(ArgumentError("Objects of type $T do not support `index_labels`"))
1070+
end
1071+
@noinline function _violated_index_label_interface(T::DataType)
1072+
throw(ArgumentError("`has_index_labels($(T)) == true` but does not have `ArrayInterface.index_labels(::$T)` defined."))
1073+
end
10681074

10691075
## Extensions
10701076

0 commit comments

Comments
 (0)