blob: 0ecdf8e47ac6253e07b31a4f23e75b0d564237da [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.md file.
# Test expression compilation using extension on String.
type: newworld
worlds:
- entry: main.dart
sources:
main.dart: |
// @dart=2.9
extension NumberParsing on String {
int parseInt() {
return int.parse(this);
}
}
expectedLibraryCount: 1
expressionCompilation:
uri: main.dart
expression: print("1234".parseInt())