Skip to content

Problem with /fox3 and the colon (":") operator #2080

Description

@cpyrgas

Everything I have tried with /fox3 and the dot operator is working great now, which is fantastic! I am only seeing some problems with the colon operator now, I hope this will be relatively easy to fix after all the other work has been done. For example the following throw a XSharp.Error at runtime:

Edit, after preparing the test it seems the problem happens only when a given identifier is first accessed with "." and then with ":"? If that's the case, the impact is low. In any case, I have adjusted tests C973 and C980 to cover also such cases

#pragma options("fox3", enable)
#pragma options("allowdot", enable)
#pragma options("memvar", enable)
#pragma options("undeclared", enable)
#pragma options("lb", enable)

CLASS TestClass123
	EXPORT TestFieldTyped := "abc" AS STRING
	CONSTRUCTOR()
		? TestFieldTyped.Length // OK
		? TestFieldTyped:Length // XSharp.Error
END CLASS

GLOBAL gcc := "abc" AS STRING
FUNCTION Start() AS VOID
	? gcc.Length // OK
	? gcc:Length // XSharp.Error
	
	TestClass123{}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions