This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233489 - Arrays of objects - code completion should say "No suggestions" for the array
Summary: Arrays of objects - code completion should say "No suggestions" for the array
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3.1
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-26 12:55 UTC by terje7601
Modified: 2013-07-29 08:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2013-07-26 12:55:25 UTC
This works as expected & says "No suggestions:

$times = array(new DateTime(), new DateTime());
$times->

While this doesn't work as expected & lists the DateTime functions:

/**
 * @return DateTime[]
 */
function getTimes() {
    return array(new DateTime(), new DateTime());
}

$times = getTimes();
$times->

same when using an @param PHPDoc tag:

/**
 * @param DateTime[] $times
 */
function setTimes($times) {
    $times->
}

All the above cases should say "No suggestions", & ideally NetBeans would also give the reason why: "No suggestions. $times is documented to be an array"
Comment 1 Ondrej Brejla 2013-07-29 08:34:00 UTC
It's an intent to allow CC in such cases:

foreach (getTimes() as $value) {
    $value->
}

It could be improved, but it's a bigger task. P4 as a reminder.