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 125916 - Error detection works incorrect for Type casting (for casting to double)
Summary: Error detection works incorrect for Type casting (for casting to double)
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks: 126072
  Show dependency tree
 
Reported: 2008-01-24 13:16 UTC by Victoria Zhukovskaya
Modified: 2008-02-08 12: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 Victoria Zhukovskaya 2008-01-24 13:16:16 UTC
f.e. 

$sig_figs = 5;
echo (round((19.6*100), $sig_figs) !== round((double)1960, $sig_figs)) ? 'not equal' : 'equal';

this example works.

Some variants:

(double)1960 is highlight as error - ") expected"

f.e.
$s = (double)$sig_figs;  ") expected"

$s = (real)$sig_figs;  - has not errors.
Comment 1 Andrew Korostelev 2008-01-28 15:59:12 UTC
expression is correct.
Should not mark it as mistaken
Comment 2 Denis Anisimov 2008-01-30 13:21:33 UTC
The problem in absence of "double" as type case operation in .nbs file.
It can be easily fixed by adding it to "php_type_cast" tokens.
Comment 3 Denis Anisimov 2008-02-01 12:43:04 UTC
This issue is closely related to 125914.
Comment 4 Victoria Zhukovskaya 2008-02-08 12:34:19 UTC
verified Build 200802080008