Bug 438972 - VarDoc doesn't support array syntax
Summary: VarDoc doesn't support array syntax
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: 2014-07-06 05:57 EDT by Dawid Pakula CLA
Modified: 2020-05-14 11:18 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 Dawid Pakula CLA 2014-07-06 05:57:17 EDT
This bug was originaly reported on PDT forum [1]

/* @var $variable MyClass[] */
/* @var $variable2 multitype:MyClass */

not work as expected

[1] - https://www.eclipse.org/forums/index.php/t/787347/
Comment 1 Michal Niewrzal CLA 2014-09-09 03:18:04 EDT
I think it was resolved with https://bugs.eclipse.org/bugs/show_bug.cgi?id=442966
Comment 2 Dawid Pakula CLA 2014-09-09 03:24:48 EDT
No, here is an example:
<?php
/* @var $x DateTime[] */
$x[1]->| // outside foreach
foreach ($x as $y) {
    $y->| // inside
}
Comment 3 Michal Niewrzal CLA 2014-09-13 12:12:01 EDT
It looks that comment '/* @var $x DateTime[] */' is parsed as normal comment. It is not recognized as VarComment. Probably parser related problem.
Comment 4 Michal Niewrzal CLA 2014-09-14 07:55:00 EDT
Patch proposal: https://git.eclipse.org/r/#/c/33350/
Comment 6 Sylvia Tancheva CLA 2014-12-13 08:39:49 EST
Verified. Closing