You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main() {
var x = 1;
try {
switch(x) {
case 0:
case 2:
case "false": // should error here
}
} catch(var e) {}
}
Given a switch statement of the form
* switch (e) { label11 … label1j1 case e1: s1 … labeln1 ..labelnjn case en: sn default: sn+1}
* or the form switch (e) { label11 … label1j1 case e1: s1 … labeln1 ..labelnjn case en: sn},
* it is a compile-time error if the expressions ek are not compile-time constants,
* of type int or String, for all 1 <= k <= n.
See tests:
co19/Language/11_Statements/08_Switch_A05_t01.dart
co19/Language/11_Statements/08_Switch_A05_t02.dart
co19/Language/11_Statements/08_Switch_A06_t01.dart
co19/Language/11_Statements/08_Switch_A06_t02.dart
... and friends
The text was updated successfully, but these errors were encountered:
This issue was originally filed by zundel@google.com
main() {
var x = 1;
try {
switch(x) {
case 0:
case 2:
case "false": // should error here
}
} catch(var e) {}
}
Given a switch statement of the form
* switch (e) { label11 … label1j1 case e1: s1 … labeln1 ..labelnjn case en: sn default: sn+1}
* or the form switch (e) { label11 … label1j1 case e1: s1 … labeln1 ..labelnjn case en: sn},
* it is a compile-time error if the expressions ek are not compile-time constants,
* of type int or String, for all 1 <= k <= n.
See tests:
co19/Language/11_Statements/08_Switch_A05_t01.dart
co19/Language/11_Statements/08_Switch_A05_t02.dart
co19/Language/11_Statements/08_Switch_A06_t01.dart
co19/Language/11_Statements/08_Switch_A06_t02.dart
... and friends
The text was updated successfully, but these errors were encountered: