Bug 544559 - Arrays defined in comments are not seen as defined
Summary: Arrays defined in comments are not seen as defined
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-19 03:27 EST by Michele Locati CLA
Modified: 2020-05-14 11:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Locati CLA 2019-02-19 03:27:46 EST
This code is parsed without any warning:

    <?php
    /** @var array $x */
    var_dump($x);

but when we have this code:

    <?php
    /** @var array $x */
    var_dump($x[0]);

we have that PDT reports that "Variable '$x' is undefined"

I'm going to submit a fix shortly.
Comment 1 Eclipse Genie CLA 2019-02-19 03:30:28 EST
New Gerrit change created: https://git.eclipse.org/r/137181
Comment 3 Thierry BLIND CLA 2019-03-13 10:14:50 EDT
Thank you for the patch Michele :)
Comment 4 Michele Locati CLA 2019-04-08 04:14:20 EDT
It seems to me that this patch isn't included in the latest PDT release, isn't it?
I just tried upgrading to Eclipse 2019-03 (4.11), and Eclipse installs PDT 6.2.0.201812112302 (I don't see a tag newer than R6_2_0 in https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/refs ...)
Comment 5 Thierry BLIND CLA 2019-04-08 04:46:30 EDT
Hi Michele,
sadly there was no new version of PDT released yet.
Maybe Dawid will create one in next weeks, or you'll have to wait for eclipse 19.06

Meanwhile you can try latest developer builds (from http://download.eclipse.org/tools/pdt/updates/6.3), it contains your fix.
Sorry about the delays :(

Thierry.
Comment 6 Michele Locati CLA 2019-04-08 09:20:32 EDT
It seems to work, thank you Thierry.

BTW I see that we have the current cases:

1. the standard PDT version for the Eclipse 2019-03 is 6.2.0.201812112302

2. using http://download.eclipse.org/tools/pdt/updates/latest-nightly as an "Available Software Site", I see PDT version 6.2.0.201812112302

3. using http://download.eclipse.org/tools/pdt/updates/6.3 I can upgrade to PDT version 6.2.0.201904051050

So, here's a couple of questions:

1. shouldn't http://download.eclipse.org/tools/pdt/updates/latest-nightly let me install the very latest PDT version (that is, the master branch of the repository)?

2. shouldn't http://download.eclipse.org/tools/pdt/updates/6.3 install version 6.3 instead of 6.2?
Comment 7 Thierry BLIND CLA 2019-04-09 03:48:55 EDT
Yes,
you're totally right Michele.
For now, http://download.eclipse.org/tools/pdt/updates/6.3 is the nightly build for upcoming 6.3 release, so http://download.eclipse.org/tools/pdt/updates/latest-nightly should (at least) have same content, and at best have master branch content.

@Dawid, can you fix our rrpositories and nightly builds, please?

Thierry.
Comment 8 Dawid Pakula CLA 2019-04-09 13:17:22 EDT
(In reply to Thierry BLIND from comment #7)
> @Dawid, can you fix our rrpositories and nightly builds, please?

Fixed. 
* Bumped version to 6.3.0 (I registered tycho-versions-plugin in pom for future)
* Upgraded tycho to 1.4.0 (builds works fine with JDK 11)
* Upgraded eclipse-current profile to 2019-03 (you can use never platform API) 
* Upgraded eclipse-next profile to 2019-06
* Removed old WTP method that allow inject p2.stats and p2.mirror properties in favour of tycho 1.3.0 features (faster build and less things to download in theory ;P)
* Removed unsupported platforms from build (32bit os)
* Restored xz compression on p2 metadata

Build is coming... I'm back ;)
Comment 9 Thierry BLIND CLA 2019-04-10 03:51:30 EDT
(In reply to Dawid Pakula from comment #8)
> (In reply to Thierry BLIND from comment #7)
> > @Dawid, can you fix our rrpositories and nightly builds, please?
> 
> Fixed. 
> * Bumped version to 6.3.0 (I registered tycho-versions-plugin in pom for
> future)
> * Upgraded tycho to 1.4.0 (builds works fine with JDK 11)
> * Upgraded eclipse-current profile to 2019-03 (you can use never platform
> API) 
> * Upgraded eclipse-next profile to 2019-06
> * Removed old WTP method that allow inject p2.stats and p2.mirror properties
> in favour of tycho 1.3.0 features (faster build and less things to download
> in theory ;P)
> * Removed unsupported platforms from build (32bit os)
> * Restored xz compression on p2 metadata
> 
> Build is coming... I'm back ;)

Hi Dawid,
thank you very much!
Glad to see you again!

Thierry.