Skip to content

Commit

Permalink
Version 2.13.0-222.0.dev
Browse files Browse the repository at this point in the history
Merge commit 'ea50eeb4beb07d8e0a672d6fb52d356b523a6392' into 'dev'
  • Loading branch information
Dart CI committed Apr 9, 2021
2 parents c8109e6 + ea50eeb commit 1f82753
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/analysis_server/test/lsp/initialization_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class InitializationTest extends AbstractLspAnalysisServerTest {
}

Future<void> test_emptyAnalysisRoots_projectWithoutPubspec() async {
projectFolderPath = '/home/empty';
projectFolderPath = convertPath('/home/empty');
final nestedFilePath = join(
projectFolderPath, 'nested', 'deeply', 'in', 'folders', 'test.dart');
final nestedFileUri = Uri.file(nestedFilePath);
Expand Down Expand Up @@ -534,7 +534,7 @@ class InitializationTest extends AbstractLspAnalysisServerTest {
}

Future<void> test_onlyAnalyzeProjectsWithOpenFiles_withoutPubpsec() async {
projectFolderPath = '/home/empty';
projectFolderPath = convertPath('/home/empty');
final nestedFilePath = join(
projectFolderPath, 'nested', 'deeply', 'in', 'folders', 'test.dart');
final nestedFileUri = Uri.file(nestedFilePath);
Expand Down
6 changes: 6 additions & 0 deletions pkg/vm/lib/transformations/type_flow/signature_shaking.dart
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,12 @@ class _Transform extends RecursiveVisitor {
super.visitProcedure(node);
}

@override
void visitField(Field node) {
typeContext = StaticTypeContext(node, shaker.typeFlowAnalysis.environment);
super.visitField(node);
}

static void forEachArgumentRev(Arguments args, _ProcedureInfo info,
void Function(Expression, _ParameterInfo) fun) {
for (int i = args.named.length - 1; i >= 0; i--) {
Expand Down
15 changes: 15 additions & 0 deletions tests/language/regress/regress45642_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2021, 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.

class Utils {
static final foo = Foo(() {});
}

class Foo {
Foo(func);
}

void main() {
print(Utils.foo); // should print: Instance of 'Foo'
}
15 changes: 15 additions & 0 deletions tests/language_2/regress/regress45642_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2021, 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.

class Utils {
static final foo = Foo(() {});
}

class Foo {
Foo(func);
}

void main() {
print(Utils.foo); // should print: Instance of 'Foo'
}
2 changes: 1 addition & 1 deletion tools/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ CHANNEL dev
MAJOR 2
MINOR 13
PATCH 0
PRERELEASE 221
PRERELEASE 222
PRERELEASE_PATCH 0

0 comments on commit 1f82753

Please sign in to comment.