Page 1 of 2
Beta 8: DIM... AS STRING Array
Posted: Tue Jan 22, 2019 11:29 am
by Thomas
Hi All,
with change to X#-Compiler version 2.0.0.8 (Bandol Beta 8 ) we get a new warning regarding DIM arrays that we didn't get with version 2.0.0.7 (Vulcan.Net dialect) .
We have enabled X# Compiler Option /vo2 (initialize all variables and fields of type STRING and all elements of DIM ... AS STRING arrays to an empty string) for VO/Vulcan compatibility.
CLASS Test
PROTECT DIM aDimArray[3] AS STRING
produces now a warning (for line of class definition):
XS0029: Cannot implicitly convert type 'string' to 'string[]'
Is this warning intended or is this a bug?
If you declare the DIM array in a method it seems ok:
PRIVATE METHOD Test(i AS INT) AS STRING
LOCAL DIM aDimArray2[3] AS STRING
...
Thanks
Thomas
Beta 8: DIM... AS STRING Array
Posted: Tue Jan 22, 2019 12:27 pm
by Chris
Hi Thomas,
This looks like a bug, but I cannot reproduce it here, no matter the combination of compiler options I tried, I do not get such a warning for neither the PROTECT or LOCAL DIM declaration.
Possibly the existence of something else of something else in the code triggers this, can you please send a compilable sample that reproduces this?
TIA,
Chris
Beta 8: DIM... AS STRING Array
Posted: Wed Jan 23, 2019 9:57 am
by Thomas
Hi Chris,
I've attached a sample for you. Hopefully that helps to find the bug!
Regards
Thomas
Beta 8: DIM... AS STRING Array
Posted: Wed Jan 23, 2019 11:40 am
by Chris
Hi Thomas,
Thanks for the sample, but unfortunately I still cannot reproduce it! I am using a newer version of the compiler, but reverted to the old Beta 8 one and still cannot see it. Can somebody else please do a quick test with the Solution Thomas posted and tell me if you do get the "Cannot implicitly convert type..." warning?
Thomas, can you please post a screenshot of the warning you get? It might give an idea on what's causing it.
(Edit: Now that I am thinking about it, could it be not a regular warning in the Errors window that you are seeing, but an "Assertion failed" popup dialog window instead?)
TIA,
Chris
Beta 8: DIM... AS STRING Array
Posted: Wed Jan 23, 2019 12:37 pm
by Thomas
Hi Chris,
you're right, it's not a warning but an error. I thought it's a warning because I had enabled option "warnings as errors" at first.
Sorry for that!
I added a screenshot with the error for you.
Can I check anything else? Dll versions, ...
Regards
Thomas
Beta 8: DIM... AS STRING Array
Posted: Wed Jan 23, 2019 8:18 pm
by Chris
Sorry Thomas, you are right of course, I thought I had reverted to the original Beta 8 compiler version but apparently I didn't, my backup was of a newer version. I completely installed back the Beta 8 and I can now easily reproduce the problem, apparently Robert fixed this after the release.
I can send you an updated compiler version, which runtime are you using in your apps, the vulcan or the X# one?
Beta 8: DIM... AS STRING Array
Posted: Thu Jan 24, 2019 9:27 am
by Thomas
Hi Chris, thanks for your help!
We use the X# runtime.
Regards
Thomas
Beta 8: DIM... AS STRING Array
Posted: Mon Jan 28, 2019 1:43 pm
by Thomas
Hi Chris, could you please send me an updated compiler version? That would be very helpful.
Thanks
Thomas
Beta 8: DIM... AS STRING Array
Posted: Mon Jan 28, 2019 1:50 pm
by Chris
Hi Thomas,
I apologize, should had contacted you earlier about this, but unfortunately I still do not have a stable new version available to send you. For now, please use the Beta 7 version and as soon as Robert has a newer version ready, I will send it to you.
Chris
Beta 8: DIM... AS STRING Array
Posted: Mon Jan 28, 2019 1:56 pm
by Thomas
Hi Chris, that's ok.
Thomas