You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// test case 1fnmyfun0(...,_:i32){}// test case 2fnmyfun1(a:i32,...,_:i32){}// test case 3structz{x:f64,y:f64,}implz{fnnew(x:f64, ...,y:f64) -> z{z{x: x,y: y }}}
I expected to see compilation error as seen when the below code is run.
fnmyfun0(_:i32,...){}
Instead, this happened:
5 | fn myfun0(...,_:i32) {}
| ^~~~~~
<source>:7:4: warning: function is never used: 'myfun1'
7 | fn myfun1(a:i32,...,_:i32) {}
| ^~~~~~
<source>:9:1: warning: struct is never constructed: 'z'
9 | struct z {
| ^~~~~~
<source>:15:8: warning: associated function is never used: 'new'
15 | fn new(x: f64, ..., y: f64) -> z {
| ^~~
<source>:7:11: warning: unused name 'a' [-Wunused-variable]
7 | fn myfun1(a:i32,...,_:i32) {}
| ^
Compiler returned: 0
The text was updated successfully, but these errors were encountered:
I tried this code: https://godbolt.org/z/4r5KGPYeE
I expected to see compilation error as seen when the below code is run.
Instead, this happened:
The text was updated successfully, but these errors were encountered: