Code completion bug |
Guru master
|
That is not a bug. How do you expect PHPEd to know the type of the $new variable?
Just add a phpdoc statement before the function to help:
|
||||||||||||||
|
|
Blizz,
How about now:
Cursor is after "$ne" and if I press ctrl+space I have this error, but should code complete into $new (with $old works). |
||||||||||||||
|
Guru master
|
Well -> is an operator, so I assume PHPEd attempts to locate a member in the $old variable. Just add spaces between them and try again:
|
||||||||||||||
|
|
Blizz,
I know that I can add spaces, but I don't want spaces there and it is legal PHP code. It is a bug. PS. Why somebody changed topic? Is this wrong place to submit bug reports? |
||||||||||||
|
Guru master
|
I'm trying to explain to you that it isn't a bug.
PHPEd interprets your code as $old->$ne| (| is the cursor). So it tries to locate a member in the "object" $old. You can have it complete the $new by adding spaces in between as I suggested (or by using => instead of -> for example) so that it isn't interpreted as an object anymore. PS: My reference to "valid code" was meant for the {$old}->{$new} part, as this can be interpreted as a member of an object by php (I think it could even give you problems when you use it like that, since the php interpretor will probably do the same) |
||||||||||||
|
|
Blizz,
I understand you, but I'm trying to explain you, that PHPED shouldn't interpret this like $old->$new because of {}. It's just small bug, I can live with that, it's not big deal. Just wanted to report a bug. Regards |
||||||||||||
|
Guru master
|
Just tested it in PHP and it seems that you are right, it does output correctly. My apologies, I thought it would be interpreted differently.
It is a bug then. |
||||||||||||
|
Code completion bug |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by