Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: tests/language/bad_constructor_test.dart

Issue 24789003: Fix test failure expectations and update status files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/language/bad_constructor_test.dart
===================================================================
--- tests/language/bad_constructor_test.dart (revision 27975)
+++ tests/language/bad_constructor_test.dart (working copy)
@@ -1,7 +1,6 @@
// Copyright (c) 2012, 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.
-// VMOptions=--constructor_name_check
class A {
// Constructor may not be static.
@@ -14,8 +13,9 @@
var m;
A.m() { m = 0; } /// 04: compile-time error
- set q(var value) { m = q; }
- A.q(); /// 05: compile-time error
+ set q(var value) { m = q; } // No name conflict with q=.
+ // The runtime error occurs because main calls new A() instead of new A.q().
+ A.q(); /// 05: runtime error
A.foo() : m = 0; /// 06: compile-time error
int foo(int a, int b) => a + b * m;
« no previous file with comments | « no previous file | tests/language/getter_no_setter_test.dart » ('j') | tests/lib/mirrors/library_metadata2_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698