Skip to content

Cannot make @heads work #9

Open
@mmikhasenko

Description

@mmikhasenko

Cannot figure out quickly what's wrong with that

lorenz = TensorIndexType("lorenz","L",4)
@heads [lorenz] pX p3 p1 p2

the first argument is not recognized as AbstractArray{SymbolicTensors.TensorIndexType}. Instead, Julia think that it is Expr...(?):

MethodError: no method matching var"@heads"(::LineNumberNode, ::Module, ::Expr, ::Symbol, ::Symbol, ::Symbol, ::Symbol)

Closest candidates are:

var"@heads"(::LineNumberNode, ::Module, !Matched::AbstractArray{SymbolicTensors.TensorIndexType}, ::Any...) at \.julia\packages\SymbolicTensors\DPYJA\src\tensor.jl:244

#macroexpand#[email protected]:115[inlined]
macroexpand@expr.jl:114[inlined]
try_macroexpand(::Module, ::Base.UUID, ::Expr)@PlutoRunner.jl:248
var"#run_expression#25"(::Bool, ::typeof(Main.PlutoRunner.run_expression), ::Module, ::Expr, ::Base.UUID, ::Nothing, ::Nothing)@PlutoRunner.jl:477
top-level scope@none:1

the @head macro looks ok, but different to @indices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions