blob: 17dccd051a445b1cbad9f9249fa0ab54d38ca97e [file] [log] [blame]
// Copyright (c) 2019, 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
/// <extension> ::=
/// `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
/// memberDeclaration*
/// `}'
/// If an extension declaration is only used locally in a library, there might be
/// no need to worry about naming conflicts or overrides. In that case, then name
/// identifier can be omitted (hence the <identifier>? in the grammar above).
/// This is equivalent to giving the extension a fresh private name.
/// @description Check that the extension name can be ommitted
/// @author
import "my_fancy_list_lib.dart";
main() {
List<String> list = ["Lily", "was", "here"];
// ^^^^^^^^^^^^^^
// [cfe] The getter 'nnDoubleLength' isn't defined for the class 'List<String>'.
// ^^^^^^^^^^^
// [cfe] Member not found: 'nnClassName'.