-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/manifold-systems/manifold/issues/573
- fix issue with using a binding expression in a ternary expression
- Loading branch information
1 parent
8649da5
commit d377e49
Showing
10 changed files
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1 Byte
(100%)
manifold-core-parent/manifold/src/main/resources/manifold/internal/javac/ManAttr_11.class
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
manifold-core-parent/manifold/src/main/resources/manifold/internal/javac/ManAttr_17.class
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
...fold-core-parent/manifold/src/main/resources/manifold/internal/javac/ManJavacParser.clazz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...nce-test/src/test/java/manifold/science/regression/UnitExpressionInTernaryBranchTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package manifold.science.regression; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class UnitExpressionInTernaryBranchTest | ||
{ | ||
@Test | ||
public void testUnitExpressionInTernaryBranch() | ||
{ | ||
ByteCoercion bt = ByteCoercion.INSTANCE; | ||
int i = 1; | ||
byte bb = i > 0 ? 2bt : (byte)1; | ||
assertEquals( 2bt, bb ); | ||
} | ||
|
||
public static class ByteCoercion | ||
{ | ||
static final ByteCoercion INSTANCE = new ByteCoercion(); | ||
|
||
public byte postfixBind( int value ) | ||
{ | ||
return (byte)value; | ||
} | ||
} | ||
} |