完善BigInt的报错信息#22
Merged
Ange1PLSGreet merged 2 commits intoLamina-dev:mainfrom Aug 9, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📝 变更描述
变更类型
变更摘要
完善了BigInt的报错信息
详细说明
BigInt信息不完善,没有指出变量数字
🔗 相关Issue
🧪 测试
测试环境
测试类型
测试说明
Script:
// 计算π到小数点后100位
bigint precision = 10^100; // 计算精度
// 计算arctan(1/x)的泰勒级数展开
func arctan_reciprocal(x, terms) {
bigint result = 0;
bigint x_squared = x * x;
bigint divisor = x;
bigint sign = 1;
}
// 使用Machin公式计算π
func calculate_pi() {
bigint terms = 100; // 泰勒级数项数
}
// 主程序
print("计算π到小数点后100位...");
var pi_100 = calculate_pi();
print("π ≈", pi_100);
测试结果
Executing file: ../interpreter/examples/pi.lm
Error: Cannot convert 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104 to BigInt in declaration of precision
报错信息已完善
📋 检查清单
代码质量
测试覆盖
文档
兼容性
构建和部署
📊 性能影响
性能测试结果
🔒 安全考虑
📸 截图/演示
🤔 需要特别关注的地方
📝 其他说明
📤 提交前最终检查