blob: 13c2fd12ecdb4d03e752952d0a7fb50bd58a7cbd [file] [log] [blame]
// Copyright (c) 2023, 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.
import 'dart:test';
test(Class c) {
c._namedExtensionPrivateMethod(); // Error
c.unnamedExtensionMethod(); // Error
c._unnamedExtensionPrivateMethod(); // Error
c._namedInjectedExtensionPrivateMethod1(); // Error
c.unnamedInjectedExtensionMethod1(); // Error
c._unnamedInjectedExtensionPrivateMethod1(); // Error
c._namedInjectedExtensionPrivateMethod2(); // Error
c.unnamedInjectedExtensionMethod2(); // Error
c._unnamedInjectedExtensionPrivateMethod2(); // Error
}
method(Class c) {
c.namedExtensionMethod(); // Ok
c.namedInjectedExtensionMethod1(); // Ok, but error at declaration.
c.namedInjectedExtensionMethod2(); // Ok, but error at declaration.
}
main() {
method(new Class());
}