mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 15:29:22 +00:00
#433 : chars cast in switch
This commit is contained in:
parent
607f5fb388
commit
7cf897e830
@ -155,6 +155,8 @@ public class ApiTests extends AbstractTest {
|
||||
assertEquals(true, r.get("switch_char"));
|
||||
assertEquals(true, r.get("switch_char_cast_int"));
|
||||
assertEquals(true, r.get("switch_char_cast_char"));
|
||||
assertEquals(true, r.get("switch_int_cast_int"));
|
||||
assertEquals(true, r.get("switch_int_cast_char"));
|
||||
|
||||
}, getSourceFile(Characters.class));
|
||||
}
|
||||
|
||||
@ -32,19 +32,31 @@ public class Characters {
|
||||
$export("switch_char", true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
switch (charD) {
|
||||
case (char) 68:
|
||||
$export("switch_char_cast_int", true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
switch (charD) {
|
||||
case (char) 'D':
|
||||
$export("switch_char_cast_char", true);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (charD) {
|
||||
case (int) 98:
|
||||
$export("switch_int_cast_int", true);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (charD) {
|
||||
case (int) 'D':
|
||||
$export("switch_int_cast_char", true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user