1f86f34c5c
This adds id-testing support to dartdevc and uses it to add a scope_test for the DartScope created for expression compilation. Change-Id: I861092e17807190880bd20e4e39e012fbf0cbe53 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334220 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Anna Gringauze <annagrin@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
95 lines
1.4 KiB
Dart
95 lines
1.4 KiB
Dart
// 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.
|
|
|
|
final x = 'scope-marker';
|
|
|
|
class Class {
|
|
var field;
|
|
|
|
Class.empty()
|
|
: field = /*
|
|
class=Class,
|
|
member=empty
|
|
*/
|
|
x {
|
|
/*
|
|
class=Class,
|
|
member=empty
|
|
*/
|
|
x;
|
|
}
|
|
|
|
Class.oneParameter(a)
|
|
: field = /*
|
|
class=Class,
|
|
member=oneParameter,
|
|
variables=[a]
|
|
*/
|
|
x {
|
|
/*
|
|
class=Class,
|
|
member=oneParameter,
|
|
variables=[a]
|
|
*/
|
|
x;
|
|
}
|
|
|
|
Class.twoParameters(a, b)
|
|
: field = /*
|
|
class=Class,
|
|
member=twoParameters,
|
|
variables=[
|
|
a,
|
|
b]
|
|
*/
|
|
x {
|
|
/*
|
|
class=Class,
|
|
member=twoParameters,
|
|
variables=[
|
|
a,
|
|
b]
|
|
*/
|
|
x;
|
|
}
|
|
|
|
Class.optionalParameter(a, [b])
|
|
: field = /*
|
|
class=Class,
|
|
member=optionalParameter,
|
|
variables=[
|
|
a,
|
|
b]
|
|
*/
|
|
x {
|
|
/*
|
|
class=Class,
|
|
member=optionalParameter,
|
|
variables=[
|
|
a,
|
|
b]
|
|
*/
|
|
x;
|
|
}
|
|
|
|
Class.namedParameter(a, {b})
|
|
: field = /*
|
|
class=Class,
|
|
member=namedParameter,
|
|
variables=[
|
|
a,
|
|
b]
|
|
*/
|
|
x {
|
|
/*
|
|
class=Class,
|
|
member=namedParameter,
|
|
variables=[
|
|
a,
|
|
b]
|
|
*/
|
|
x;
|
|
}
|
|
}
|