Skip to content

panic: interface conversion in expressions comparison #982

Description

@lmorg

Describe the bug:

~ » @PWD < 2
Error: interface conversion: interface {} is float64, not string
Stack:

  - function: runtime.gopanic(...)
    filename: /opt/homebrew/Cellar/go/1.25.3/libexec/src/runtime/panic.go:783

  - function: runtime.panicdottypeE(...)
    filename: /opt/homebrew/Cellar/go/1.25.3/libexec/src/runtime/iface.go:275

  - function: github.com/lmorg/murex/lang/expressions.expGtLt(...)
    filename: /Users/laurencemorgan/dev/go/src/github.com/lmorg/murex/lang/expressions/exp06.go:34

  - function: github.com/lmorg/murex/lang/expressions.executeExpression(...)
    filename: /Users/laurencemorgan/dev/go/src/github.com/lmorg/murex/lang/expressions/expression.go:145

  - function: github.com/lmorg/murex/lang/expressions.(*ParserT).executeExpr(...)
    filename: /Users/laurencemorgan/dev/go/src/github.com/lmorg/murex/lang/expressions/expression.go:18
Build:
  OS:  darwin
  CPU: arm64
Compiler: go1.25.3

Expected behaviour:
Uncertain here. But definitely not a crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions