Peregrine
Peregrine copied to clipboard
C++ compiler giving errors instead of peregrine handling function arguments correctly.
when i do not give a function all the arguments needed, the c++ compiler will give me errors. Peregrine should check this and give an error not the c++ compiler. code
def function(arg)->int:
printf("arg: %d\n", arg)
return 1
def main()->int:
function()
return 0
error
temp.cc: In function ‘int main()’:
temp.cc:19:92: error: no matching function for call to ‘____P____P________home____dev____projects____Peregrine____builddir____main___pefunction(____P____exception_handler*&)’
19 | ____P____P________home____dev____projects____Peregrine____builddir____main___pefunction(____Pexception_handlers);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
temp.cc:13:9: note: candidate: ‘template<class auto:3> int64_t ____P____P________home____dev____projects____Peregrine____builddir____main___pefunction(auto:3, ____P____exception_handler*)’
13 | int64_t ____P____P________home____dev____projects____Peregrine____builddir____main___pefunction(auto ____P____P____arg,____P____exception_handler* ____Pexception_handlers) noexcept {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
temp.cc:13:9: note: template argument deduction/substitution failed:
temp.cc:19:92: note: candidate expects 2 arguments, 1 provided
19 | ____P____P________home____dev____projects____Peregrine____builddir____main___pefunction(____Pexception_handlers);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
@InsaneMiner Yes you are correct but the typechecker is highly wip so it is disabled by default
@SaptakBhoumik Ok
I will keep this open until it has been fixed, is that alright?
@InsaneMiner yes you can keep it open