You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2020/08/31 17:01:58 UTC
[groovy] branch GROOVY-9704 created (now f8fe420)
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a change to branch GROOVY-9704
in repository https://gitbox.apache.org/repos/asf/groovy.git.
at f8fe420 GROOVY-9704: load minus one as long integer
This branch includes the following new commits:
new f8fe420 GROOVY-9704: load minus one as long integer
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[groovy] 01/01: GROOVY-9704: load minus one as long integer
Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY-9704
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit f8fe420e19377f69fef01ac60c4510afc06ad5f2
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Mon Aug 31 12:01:43 2020 -0500
GROOVY-9704: load minus one as long integer
---
.../groovy/classgen/asm/sc/StaticTypesUnaryExpressionHelper.java | 2 +-
src/test/groovy/transform/stc/UnaryOperatorSTCTest.groovy | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesUnaryExpressionHelper.java b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesUnaryExpressionHelper.java
index a46bf94..54d75fe 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesUnaryExpressionHelper.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesUnaryExpressionHelper.java
@@ -62,7 +62,7 @@ public class StaticTypesUnaryExpressionHelper extends UnaryExpressionHelper impl
if (top == int_TYPE || top == long_TYPE || top == short_TYPE || top == byte_TYPE || top == char_TYPE) {
bytecodeX(mv -> {
if (top == long_TYPE) {
- mv.visitLdcInsn(-1);
+ mv.visitLdcInsn(-1L);
mv.visitInsn(LXOR);
} else {
mv.visitInsn(ICONST_M1);
diff --git a/src/test/groovy/transform/stc/UnaryOperatorSTCTest.groovy b/src/test/groovy/transform/stc/UnaryOperatorSTCTest.groovy
index b4854c6..6768f5e 100644
--- a/src/test/groovy/transform/stc/UnaryOperatorSTCTest.groovy
+++ b/src/test/groovy/transform/stc/UnaryOperatorSTCTest.groovy
@@ -61,7 +61,7 @@ class UnaryOperatorSTCTest extends StaticTypeCheckingTestCase {
}
// GROOVY-9704
- void _FIXME_testBitwiseNegate_long() {
+ void testBitwiseNegate_long() {
assertScript '''
long x = 1L
assert ~x == -2L