<commit_before>/*
 * 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 Unless explicitly stated otherwise, all ordinary rules that apply to methods
 * apply to abstract methods.
 * 7.1: It is a static warning if a class C declares an instance method
 * named n and a static member named n is declared in a superclass of C.
 * @description Checks that a static warning is produced when a class declares an abstract
 * method with the same name as a static variable in its superclass.
 * @static-warning
 * @author rodionov
 * @needsreview issue 986
 */

class A {
  static var f;
}

class C extends A {
  abstract f();
}

main() {
  try {
    new C().f();
  } catch (NoSuchMethodException ok) {}
}
<commit_msg>Replacing an obsolete test with a new one (ch. 7.1.1)<commit_after>/*
 * 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 to specify a body for an abstract method.
 * @description Checks that a compile-time error is produced when an abstract method
 * has a body.
 * @compile-error
 * @author msyabro
 */

class C {
  abstract m1() {}
}

main() {
  try {
    new C().m1();
  } catch(var ok){}
}

{'fraction_non_alphanumeric': 0.08788282290279627, 'fraction_numerical': 0.011984021304926764, 'mean_word_length': 3.306590257879656, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2145834', 'n_tokens_mistral': 450, 'n_tokens_neox': 429, 'n_words': 220}