Commit 05fdcff
authored
Add getFunction to the Context (#338)
Fixes #335 by adding a getFunction() method to the Context class which goes up the parent context tree until it gets to the Library and is able to execute getFunction.
This fixes the issue of an overloaded function that has the same name as one of its arguments and calls itself (or another overload). The broad context.get() method was being used to get the possible FunctionDefs was returning the first thing that matches the name of the function. So it was ending up with the value of the argument passed in which had the same name. Tests are included that replicate this issue with multiple modes of execution.
This PR also updates the cql-to-elm version for test data generation to 3.22.0 and updates the translator options to roughly match the options used by MADiE.
Included (squashed) commits:
* initial adding of test for fluent overloading issue
* updated cql-to-elm to 3.22.0 and added some translator options that MADiE uses
* Added test for overloaded functions calling themselves
* resolved npm audit concern with babel and fixed prettier issue with test-data file
* reworked test to have an argument name matching the overloaded function name. fixed issue by adding getFunction to Context
* add missing newline to package-lock.json that npm insists on making
* added info on translator settings. cql fix for ProperIncludedIn test. re-built test, fixing some post rebase stuff. added new test library to prettier ignore
* renamed new tests. rebuilt spec-test data with new translator and added workaround for ProperIncludedIn null test1 parent 5692931 commit 05fdcff
53 files changed
Lines changed: 211759 additions & 56442 deletions
File tree
- examples/browser
- src
- elm
- runtime
- test
- elm
- aggregate
- arithmetic
- clinical
- comparison
- conditional
- convert
- datetime
- date
- executor
- expression
- external
- instance
- interval
- library
- list
- literal
- logical
- message
- nullological
- parameters
- query
- reusable
- string
- structured
- type
- generator
- src/main/java
- spec-tests
- cql
- xml
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6876 | 6876 | | |
6877 | 6877 | | |
6878 | 6878 | | |
6879 | | - | |
| 6879 | + | |
6880 | 6880 | | |
6881 | 6881 | | |
6882 | 6882 | | |
| |||
8082 | 8082 | | |
8083 | 8083 | | |
8084 | 8084 | | |
| 8085 | + | |
| 8086 | + | |
| 8087 | + | |
8085 | 8088 | | |
8086 | 8089 | | |
8087 | 8090 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments