Open rapiz1 opened 4 years ago
Given two procedures that have the same name, the compiler should alert an ambiguous call.
Having two procedures with the same name is generally OK since Chapel supports overloading. In this case, the issue is more that the two procedures have the identical signature, right? (e.g., the following works as expected:
record inner {
var a = 1;
proc const size(x: int) {
return a;
}
proc const size(x: real) {
return a;
}
}
record outer {
forwarding var instance: inner;
}
var x = new outer();
var a = x.size(1);
var b = x.size(1.2);
writeln(a);
writeln(b);
)
Noting that this issue feels like its in the same vein as https://github.com/chapel-lang/chapel/issues/13027, although this issue is specific to forwarding. Changing new outer
to new inner
gives the same ambiguous error as https://github.com/chapel-lang/chapel/issues/13027. However, this issue still feels distinct enough to leave open
Summary of Problem
Given two procedures that have the same name, the compiler should alert an ambiguous call. But compiling the following code that comes with a
forwarding
produces an irrelevant error message.Steps to Reproduce
Source Code:
Errors:
Associated Future Test(s):
None
Configuration Information