question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Variables with underscores don't work in array length match syntax

See original GitHub issue

A variable whose name contains an underscore will not properly parse in an array length match expression.

    Scenario: varbs
      * def arr = ['a','b','c','d','e']
      * match arr == "#[5]"
      * def two = 2
      * def three = 3
      * match arr == "#[two+three]"
      * def t_wo = 2
      # fails
      * match arr == "#[t_wo+three]"

The last test fails with error:

match failed: EQUALS
$ | actual array length is 5 (LIST:STRING)
  ["a","b","c","d","e"]
  '#[t_wo+three]'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ptrthomascommented, Oct 25, 2022

@aimanfatima great job ! thanks for your help and contributing 👍

0reactions
ptrthomascommented, Nov 2, 2022

1.3.0 released

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using underscores and matching variable names to coerce ...
The array variable names are prefixed with an underscore (_); The array variable names are otherwise identically named in the receiving function ...
Read more >
Underscore.js
Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.
Read more >
What is the purpose of the single underscore "_" variable in ...
A dummy name when a variable is not intended to be used, but a name is required by syntax/semantics. · Many REPLs/shells store...
Read more >
Usages of Underscore (_) in Scala - Baeldung
The underscore can be used to ignore variables and types that aren't used anywhere in the code. 3.1. Ignored Parameter.
Read more >
PowerShell Variables and Arrays - Netwrix Blog
Discover what variables and arrays are in PowerShell. ... Sort array; Add to array; Array length; Remove item from array; Array contains ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found