I just installed the latest FOX Bandol 2.0.1 version and did my usual initial test: Clean + Build the solution. The compiler now throws an error for a piece of code which has never been a problem before:
LOCAL languages AS IEnumerable<STRING>
languages := langIni:GetSection("POOL")
IF languages:ANY() // XS9002 Parser: unexpected input 'IF languages:ANY'
result := languages:First()
ENDIF
The proper using directives System.Collections.Generic and System.Linq are included in the source code file, so is the assembly reference System.Core. Changing the character casing of "ANY" to "Any" does not seem to make a difference either.
Any idea what I'm doing wrong?
Best regards,
Bernhard
Using VS 2017 Enterprise 15.9.4 with the Vulcan.NET dialect.
Bernhard Mayer wrote:Dear fellow X#'ers!
I just installed the latest FOX Bandol 2.0.1 version and did my usual initial test: Clean + Build the solution. The compiler now throws an error for a piece of code which has never been a problem before:
LOCAL languages AS IEnumerable<STRING>
languages := langIni:GetSection("POOL")
IF languages:@@ANY() // XS9002 Parser: unexpected input 'IF languages:ANY'
result := languages:First()
ENDIF
Any idea what I'm doing wrong?
Change to @@Any do the trick. It seems Vulcan dialect have "ANY" as a keyword. If you run the code under Core it will run unchanged.
USING System
USING System.Collections.Generic
USING System.Linq
USING System.Text
FUNCTION Start() AS VOID
LOCAL languages AS IEnumerable<STRING>
languages := List<STRING>{<STRING>{"Lang1", "Lang2", "Lang3"}}
LOCAL result AS LOGIC
IF result := languages:Any() // No problem with Core
ENDIF
?result
RETURN
______________________
Johan Nel
Boshof, South Africa