X-Sharp/XSharpPublic

VFP: Bogus warning when calling a function with /fox2+

Closed this issue · 2 comments

Following results to 3 bogus warnings on using the Test() function. It is reported only when all 3 compiler options memvar, undeclared and fox2 are enabled

// warning XS9073: Variable 'Test' has not been declared. Assuming this is a FIELD or a MEMVAR.

// /memvar+ /undeclared+ /fox2+
FUNCTION Start() AS VOID
LOCAL u := 123
? Test(u)
? Test(Test(u))

FUNCTION Test(u)
RETURN u

Additional sample:

// FoxPro dialect, /fox2+ /memvar+ /undeclared+
FUNCTION Start() AS VOID
	PUBLIC mymemvar
	mymemvar := "asd"
	undeclared := "123"

	? Left("abc",1) // no warnings, OK
	? Left(undeclared,1) // warning XS9073: Variable 'Left' has not been declared. Assuming this is a FIELD or a MEMVAR.
	? Left(mymemvar,1) // warning XS9073: Variable 'Left' has not been declared. Assuming this is a FIELD or a MEMVAR.

Confirmed fixed