Make sure setter does not conflict with method

Review URL: https://codereview.chromium.org//11312109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14600 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
hausner@google.com 2012-11-06 22:51:01 +00:00
parent 657358ecc2
commit 323c735040
4 changed files with 4 additions and 10 deletions

View file

@ -582,9 +582,11 @@ class ClassDesc : public ValueObject {
fields_(GrowableObjectArray::Handle(GrowableObjectArray::New())) {
}
// Parameter 'name' is the unmangled name, i.e. without the setter
// name mangling.
bool FunctionNameExists(const String& name, RawFunction::Kind kind) const {
// First check if a function or field of same name exists.
if (FunctionExists(name)) {
if ((kind != RawFunction::kSetterFunction) && FunctionExists(name)) {
return true;
}
// Now check whether there is a field and whether its implicit getter

View file

@ -132,7 +132,7 @@ constructor_call_wrong_argument_count_negative_test: Fail # Runtime only test, r
disable_privacy_test: Fail # Issue 1882: Needs --disable_privacy support.
factory5_test/00: Fail # issue 3079
field_method4_negative_test: Fail # Runtime only test, rewrite as multitest
field7_negative_test: Fail, OK # language changed, test issue 5249
first_class_types_literals_test: Fail # issue 6283
getter_no_setter_test/01: Fail # Fails to detect compile-time error.
getter_no_setter2_test/01: Fail # Fails to detect compile-time error.
@ -467,7 +467,6 @@ map_literal3_test: Fail # Map literals take 2 type arguments.
class_cycle_negative_test: Fail, OK # Bad test: assumes eager loading.
field1_negative_test: Fail, OK # Bad test: assumes eager loading.
field6_negative_test: Fail, OK # Bad test: assumes eager loading.
field7_negative_test: Fail, OK # Bad test: assumes eager loading.
interface_cycle_negative_test: Fail, OK # Bad test: assumes eager loading.
# Common problems with dart2js. In illegal family, invalid
# declarations are simply not parsed. In pseudo kw dart2js

View file

@ -226,7 +226,6 @@ class_cycle_negative_test: Fail, OK # Bad test: assumes eager loading.
external_test/16: Fail, OK # Bad test: assumes eager loading.
field1_negative_test: Fail, OK # Bad test: assumes eager loading.
field6_negative_test: Fail, OK # Bad test: assumes eager loading.
field7_negative_test: Fail, OK # Bad test: assumes eager loading.
interface_cycle_negative_test: Fail, OK # Bad test: assumes eager loading.
syntax_test/47: Fail, OK # Bad test: assumes eager loading.

View file

@ -13,11 +13,5 @@ class A {
}
}
class Field7NegativeTest {
static testMain() {
}
}
main() {
Field7NegativeTest.testMain();
}