cqframework / cqframework/cql-tests

Incorrect interpretation of flatten null as List<>

Open
#103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
7
Forks
8
Avg merge
12d 5h
Merged PRs (30d)
2

Description

define "flatten null": // returns [ null, 1 ]
flatten(
{
null as List<System.Integer>,
{ 1 }
}
)
define "flatten {}": // returns [ 1 ]
flatten(
{
{} as List<System.Integer>,
{ 1 }
}
)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two flatten expressions shown in the issue and compare the results for a null list and an empty list. Trace how the test repository represents these cases, then update the relevant test coverage so the expected distinction between [ null, 1 ] and [ 1 ] is explicit.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.