blob: b32e636704da259178875865204668b80b0a99f9 [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 A variable declaration statement declares a new local variable.
/// localVariableDeclaration:
/// initializedVariableDeclaration ’;’
/// ;
/// @description Checks that a variable declaration statement var id; introduces
/// a new variable id with dynamic static type into the innermost enclosing scope.
/// @author vasya
import '../../../Utils/expect.dart';
class C {}
main() {
var id;
Expect.isTrue(id is dynamic);
Expect.runtimeIsType<dynamic>(id);
id = false;
id = "";
id = 2;
id = new C();
id = () {};
}