IDEA-225778 Inline object with the subsequent call

GitOrigin-RevId: 122e10e69f93c31e289a024381c7315f1a62203b
This commit is contained in:
Tagir Valeev
2019-10-29 15:47:48 +07:00
committed by intellij-monorepo-bot
parent 7b5dcb3d80
commit c57a3e9f2a
18 changed files with 1259 additions and 472 deletions

View File

@@ -0,0 +1,22 @@
class Main {
BitString test(long result, long mask) {
BitString intersection = new <caret>BitString(result, mask).intersect(super.getBitwiseMask());
assert intersection != null;
return intersection;
}
}
class BitString {
final long myBits;
final long myMask;
BitString(long bits, long mask) {
myBits = bits & mask;
myMask = mask;
}
BitString intersect(BitString other) {
long intersectMask = myMask & other.myMask;
if ((myBits & intersectMask) != (other.myBits & intersectMask)) return null;
return new BitString(myBits | other.myBits, myMask | other.myMask);
}
}