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 74539 - bit-wise patterns not recongised
Summary: bit-wise patterns not recongised
Status: RESOLVED WONTFIX
Alias: None
Product: contrib
Classification: Unclassified
Component: Jackpot (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: _ tball
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 19:59 UTC by _ alexlamsl
Modified: 2010-04-27 18:40 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 _ alexlamsl 2006-04-06 19:59:17 UTC
int i, j;

I'd expect:

i = j & ~j;

so be picked up by the rule:

$a & ~$a => 0 :: sideEffectFree($a);

or simply:

$a & ~$a => 0;

Basically, the following works:

~~$a => $a;
$a & $a => $a :: sideEffectFree($a);
$a | $a => $a :: sideEffectFree($a);
$a ^ $a => 0 :: sideEffectFree($a);

And the following doesn't:
$a & ~$a => 0 :: sideEffectFree($a);
~$a & $a => 0 :: sideEffectFree($a);
$a | ~$a => -1 :: sideEffectFree($a);
~$a | $a => -1 :: sideEffectFree($a);
$a ^ ~$a => -1 :: sideEffectFree($a);
~$a ^ $a => -1 :: sideEffectFree($a);
Comment 1 _ alexlamsl 2006-04-06 20:23:34 UTC
In addition, the following works:

~$a & ~$b => ~($a | $b);
~$a | ~$b => ~($a & $b);
~$a ^ ~$b => $a ^ $b;
Comment 2 _ tball 2006-04-06 21:22:40 UTC
I'll investigate what's wrong after I get back from vacation.
Comment 3 _ alexlamsl 2006-04-06 21:54:39 UTC
cool - have a nice holiday ;-)
Comment 4 Jesse Glick 2010-04-27 18:40:56 UTC
The old Jackpot module is no longer maintained. There is a rewrite in progress at: http://bitbucket.org/jlahoda/jackpot30/wiki/Home