-
-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Description
Describe the bug
When a function is redefined, then instead of throwing error, it compiles successfully. But the type of parameters of first remains not_known, while the redefinition gets the dtype for params.
Steps to Reproduce
Consider the following simC code:-
fun sum(a, b) {
return a + b;
}
fun sum(c, d) {
return c - d;
}
MAIN
var res = sum(1, 2)
var res1 = sum(2, 1)
END_MAINThis is the C code generated:-
int sum(not_known a, not_known b) {
return a + b;
}
int sum(int c, int d) {
return c - d;
}
int main() {
int res = sum(1, 2);
int res1 = sum(2, 1);
return 0;
}Expected behavior
It should throw an error:-
[Line 5] Error: Function sum redefinedReactions are currently unavailable