| # Copyright (c) 2024, 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. | |
| # https://github.com/dart-lang/sdk/issues/56911 | |
| sources: | | |
| void main() { | |
| List<ExtensionType> list = [new ExtensionType("0")]; | |
| list.forEach((ExtensionType input) { | |
| print(input.value); | |
| }); | |
| } | |
| extension type ExtensionType<E extends String>(E e) { | |
| int get value => e.codeUnitAt(0); | |
| } | |
| definitions: ["#this"] | |
| # String | |
| definition_types: ["dart:core", "_OneByteString", "1", "0"] | |
| type_definitions: ["E"] | |
| type_bounds: ["dart:core", "String", "1", "0"] | |
| type_defaults: ["dart:core", "String", "1", "0"] | |
| method: "ExtensionType.value" | |
| static: true | |
| offset: 205 # at the 'value' of 'int get value => s.codeUnitAt(0);' line. | |
| scriptUri: main.dart | |
| expression: | | |
| () { | |
| s; | |
| s.codeUnitAt(0); | |
| value; | |
| }() |