Improvement: Shuold detect as compiler error/warning when passing divert value without Arrow...
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 540
- PR merge metrics
- No merged PRs in 30d
Description
Test code... (correct format)
```
-> ChooseManueverListAtk("massweapons", 5, 14, ORIENTATION_AGGRESSIVE, 6,7,4,5, 1, 0, -1, ->GameStart)
=== GameStart
Game starts.
->DONE
=== ChooseManueverListAtk(profeciencyType, profeciencyLevel, diceAvailable, orientation, ATN, ATN2, ATN_off, ATN2_off, blunt, hasShield, _confirmSelection, ->_callbackThread )
// code removed for brevity
->_callbackThread
```
vs
with typo without `->` behind `GameStart`:
`-> ChooseManueverListAtk("massweapons", 5, 14, ORIENTATION_AGGRESSIVE, 6,7,4,5, 1, 0, -1, GameStart)`
Compiler passes it without error, but during running scenerio, it will get a runtime error with the _callbackThread divert, stating that the the value is null/empty/zero. So, it seems `GameStart` passes, but strangely resolves to `0`? Shouldn't the compiler detect an error? Why does it allow it to pass?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.