解决Reflector中的paramArgTypeMatch匹配类型自动向上提升 #638
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在aviator脚本中使用Math.round()函数遇到了下面的问题:
查看源码Reflector#paramArgTypeMatch,发现传入的是一个整数那么就无法匹配到Math.round(),传入的是一个Double类型的数值,始终匹配到是Math.round(float a),这里可能会造成精度丢失。
我按照基本数据类型自动向上提升的原则,尝试修改了Reflector#paramArgTypeMatch的匹配规则,经过测试发现能达到预期的效果。
希望作者能够帮忙看看,我这种调整会引入其他的问题和潜在的风险点吗?