Use a different name for "y1". That name is already spoken for and declared with a different type.
With verbose compile it shows here as:
Code:
T:\tCode\FORUM\VarConflict\VarConflict.ino:1:11: error: 'short int y1' redeclared as different kind of symbol
short x1, y1, x2, y2;
^
In file included from T:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4/WProgram.h:36:0,
from T:\TEMP\arduino_build_VarConflict.ino\pch\Arduino.h:6:
t:\arduino-1.8.13\hardware\tools\arm\arm-none-eabi\include\math.h:539:15: note: previous declaration 'double y1(double)'
extern double y1 _PARAMS((double));
^
T:\tCode\FORUM\VarConflict\VarConflict.ino: In function 'void setup()':
T:\tCode\FORUM\VarConflict\VarConflict.ino:10:8: error: assignment of function 'double y1(double)'
y1 = 5;
^
T:\tCode\FORUM\VarConflict\VarConflict.ino:10:8: error: cannot convert 'int' to 'double(double)' in assignment