Skip to content

Commit 1e7348b

Browse files
committed
fix: fix JET identified missing method
1 parent f3fb1ca commit 1e7348b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ReadOnlyNode.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,13 @@ struct ReadOnlyNode{T,D,N} <: AbstractReadOnlyNode{T,D,N}
3333
ReadOnlyNode(n::N) where {T,N<:AbstractExpressionNNode{T}} = new{T,max_degree(N),N}(n)
3434
end
3535
@unstable constructorof(::Type{<:ReadOnlyNode}) = ReadOnlyNode
36+
# TODO: Should this provide the degree? Or is it fine, since it always infers it from the inner node type?
37+
38+
function with_type_parameters(::Type{N}, ::Type{T}) where {N<:ReadOnlyNode,T}
39+
return ReadOnlyNode{T,max_degree(N),with_type_parameters(inner_node_type(N), T)}
40+
end
41+
42+
@inline inner_node_type(::Type{<:(ReadOnlyNode{T,D,N} where {T,D})}) where {N} = N
43+
@inline inner_node_type(::Type{<:ReadOnlyNode}) = NNode
3644

3745
end

0 commit comments

Comments
 (0)