blob: c8e56813e0e9f66e35027a11d3a48c64c8fcad96 [file] [log] [blame]
/*
* Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion It is a compile-time error if the values of the expressions ek
* are not either:
* • instances of the same class C, for all k in 1..n, or
* • instances of a class that implements int, for all k in 1..n, or
* • instances of a class that implements String, for all k in 1..n.
* @description Checks that it is a compile-time error if case expressions
* of a switch statement with a default case have different types.
* @compile-error
* @author msyabro
*/
main() {
var x = 1;
switch (x) {
case 0:
case 2:
case "false":
default:
}
}