2011-10-05 06:22:36 +00:00
|
|
|
// 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.
|
|
|
|
// Dart test to catch error reporting bugs in class fields declarations.
|
|
|
|
// Should be an error because we have a getter overriding a function name.
|
|
|
|
|
|
|
|
class A {
|
|
|
|
int a() {
|
|
|
|
return 1;
|
|
|
|
}
|
2017-04-17 21:52:57 +00:00
|
|
|
|
2012-09-07 11:50:07 +00:00
|
|
|
int get a {
|
2011-10-05 06:22:36 +00:00
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Field6NegativeTest {
|
|
|
|
static testMain() {
|
2013-05-24 20:09:29 +00:00
|
|
|
var a = new A();
|
2011-10-05 06:22:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
main() {
|
|
|
|
Field6NegativeTest.testMain();
|
|
|
|
}
|