Repository navigation
Commit af653cc
committed
parser: invoke static delegate members accessed through a type
Invoking a static member of a delegate type through the name of its
type, such as 'Formulas.Square(2)' for a registered type with a static
Func<int, int> Square, failed with "Cannot access a member on a null
reference", because the code expected the member to always have an
instance.
Access the member without an instance, since a member bound through a
type is static.1 parent d83b6cd commit af653cc
2 files changed
Lines changed: 20 additions & 5 deletions
File tree
- src/Ramstack.ExpressionParser
- tests/Ramstack.ExpressionParser.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | 306 | | |
311 | 307 | | |
312 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
| |||
502 | 516 | | |
503 | 517 | | |
504 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
505 | 524 | | |
506 | 525 | | |
507 | 526 | | |
| |||
0 commit comments