Skip to content

Commit d806bca

Browse files
author
Dart CI
committed
Version 3.9.0-233.0.dev
Merge 265a970 into dev
2 parents 79e57e2 + 265a970 commit d806bca

File tree

7 files changed

+84
-18
lines changed

7 files changed

+84
-18
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ vars = {
138138
"i18n_rev": "43214dde639f496377b6151115d1415128298c53",
139139
"leak_tracker_rev": "f5620600a5ce1c44f65ddaa02001e200b096e14c", # rolled manually
140140
"material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e",
141-
"native_rev": "7f5bfa6973becbb0b4d6ecc34f41f9cdc5701d83", # rolled manually while native assets are experimental
141+
"native_rev": "5eadfaf3b732bc512d327ac284b6f294bf05e4c2", # rolled manually while native assets are experimental
142142
"protobuf_rev": "32d53dad4565fc6ccd69196b8fd213454f3e8ed5",
143143
"pub_rev": "818f10b4bf9249bd0b2c212dd8709675eeb14cd2", # rolled manually
144144
"shelf_rev": "082d3ac2d13a98700d8148e8fad8f3e12a6fd0e1",

PRESUBMIT.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -537,19 +537,6 @@ def _CheckDartApiWinCSync(input_api, output_api):
537537
return []
538538

539539

540-
def _CheckNoRuntimeObservatoryChanges(input_api, output_api):
541-
"""Ensures that no further changes are made to runtime/observatory."""
542-
for f in input_api.AffectedFiles(include_deletes=False):
543-
path = f.LocalPath()
544-
if path.startswith("runtime/observatory/"):
545-
return [
546-
output_api.PresubmitError(
547-
'Observatory is being moved to pkg/observatory. Files under '
548-
'runtime/observatory should no longer be modified.')
549-
]
550-
return []
551-
552-
553540
def _CommonChecks(input_api, output_api):
554541
results = []
555542
results.extend(_CheckValidHostsInDEPS(input_api, output_api))
@@ -565,7 +552,6 @@ def _CommonChecks(input_api, output_api):
565552
results.extend(_CheckAnalyzerFiles(input_api, output_api))
566553
results.extend(_CheckDevCompilerSync(input_api, output_api))
567554
results.extend(_CheckDartApiWinCSync(input_api, output_api))
568-
results.extend(_CheckNoRuntimeObservatoryChanges(input_api, output_api))
569555
return results
570556

571557

pkg/analysis_server/lib/src/services/completion/dart/in_scope_completion_pass.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@ class InScopeCompletionPass extends SimpleAstVisitor<void> {
26402640
suggestRequired: noRequired,
26412641
suggestVariableName: name.coversOffset(offset),
26422642
suggestCovariant: suggestCovariant,
2643-
suggestThis : suggestThis,
2643+
suggestThis: suggestThis,
26442644
);
26452645
}
26462646
_forTypeAnnotation(node);
@@ -3065,6 +3065,7 @@ class InScopeCompletionPass extends SimpleAstVisitor<void> {
30653065
}
30663066

30673067
if (offset <= node.name.end) {
3068+
var constAdded = false;
30683069
var container = grandparent?.parent;
30693070
var keyword = parent.keyword;
30703071
var type = parent.type;
@@ -3074,6 +3075,7 @@ class InScopeCompletionPass extends SimpleAstVisitor<void> {
30743075
keywordHelper.addKeyword(Keyword.CONST);
30753076
keywordHelper.addKeyword(Keyword.FINAL);
30763077
keywordHelper.addKeyword(Keyword.VAR);
3078+
constAdded = true;
30773079
}
30783080
if (keyword == null || keyword.keyword != Keyword.VAR) {
30793081
_forTypeAnnotation(node);
@@ -3110,7 +3112,9 @@ class InScopeCompletionPass extends SimpleAstVisitor<void> {
31103112
// The parser often recovers from incomplete code by assuming that
31113113
// the user is typing a field declaration, but it's quite possible
31123114
// that the user is trying to type a different kind of declaration.
3113-
keywordHelper.addKeyword(Keyword.CONST);
3115+
if (!constAdded) {
3116+
keywordHelper.addKeyword(Keyword.CONST);
3117+
}
31143118
if (container is ClassDeclaration) {
31153119
keywordHelper.addKeyword(Keyword.FACTORY);
31163120
}

pkg/linter/test/rules/omit_obvious_local_variable_types_test.dart

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,26 @@ class A {
5858
);
5959
}
6060

61+
test_cascade_dotShorthand() async {
62+
await assertNoDiagnostics(r'''
63+
f() {
64+
A a = .new()..x..x..x;
65+
}
66+
67+
class A {
68+
final x = 0;
69+
}
70+
''');
71+
}
72+
73+
test_dot_shorthand() async {
74+
await assertNoDiagnostics(r'''
75+
f() {
76+
int i = .parse('1');
77+
}
78+
''');
79+
}
80+
6181
test_forEach_inferredList() async {
6282
await assertDiagnostics(
6383
r'''
@@ -69,6 +89,16 @@ f() {
6989
);
7090
}
7191

92+
test_forEach_inferredList_dotShorthands() async {
93+
await assertNoDiagnostics(r'''
94+
enum E { a, b, c }
95+
96+
f() {
97+
for (E e in [.a, .b, .c]) { }
98+
}
99+
''');
100+
}
101+
72102
test_forEach_listWithNonObviousElement() async {
73103
await assertNoDiagnostics(r'''
74104
f() {
@@ -175,6 +205,16 @@ class A {}
175205
);
176206
}
177207

208+
test_instanceCreation_nonGeneric_dotShorthand() async {
209+
await assertNoDiagnostics(r'''
210+
f() {
211+
A a = .new();
212+
}
213+
214+
class A {}
215+
''');
216+
}
217+
178218
test_list() async {
179219
await assertDiagnostics(
180220
r'''
@@ -186,6 +226,16 @@ f() {
186226
);
187227
}
188228

229+
test_list_dotShorthand() async {
230+
await assertNoDiagnostics(r'''
231+
enum E { a, b, c }
232+
233+
f() {
234+
List<E> a = [.a, .b, .c];
235+
}
236+
''');
237+
}
238+
189239
test_list_ok1() async {
190240
await assertNoDiagnostics(r'''
191241
f() {

pkg/linter/test/rules/omit_obvious_property_types_test.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ class C {
9191
);
9292
}
9393

94+
test_dot_shorthand() async {
95+
await assertNoDiagnostics(r'''
96+
int i = .parse('1');
97+
''');
98+
}
99+
94100
test_genericInvocation_paramIsType_static() async {
95101
await assertNoDiagnostics(r'''
96102
T bar<T>(T d) => d;
@@ -197,6 +203,16 @@ class C {}
197203
);
198204
}
199205

206+
test_instanceCreation_nonGeneric_static_dotShorthand() async {
207+
await assertNoDiagnostics(r'''
208+
class A {
209+
static C c = .new();
210+
}
211+
212+
class C {}
213+
''');
214+
}
215+
200216
test_instanceCreation_nonGeneric_topLevel() async {
201217
await assertDiagnostics(
202218
r'''
@@ -208,6 +224,14 @@ class C {}
208224
);
209225
}
210226

227+
test_instanceCreation_nonGeneric_topLevel_dotShorthand() async {
228+
await assertNoDiagnostics(r'''
229+
C c = .new();
230+
231+
class C {}
232+
''');
233+
}
234+
211235
test_list_ok1_static() async {
212236
await assertNoDiagnostics(r'''
213237
class A {

third_party/pkg/native_toolchain_c.status

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
test/cbuilder/cbuilder_cross_android_test: SkipByDesign # Cross compilation is not tested on the Dart CI.
66
test/cbuilder/cbuilder_cross_linux_host_test: SkipByDesign # Cross compilation is not tested on the Dart CI.
77
test/cbuilder/cbuilder_cross_windows_host_test: SkipByDesign # Cross compilation is not tested on the Dart CI.
8+
test/clinker/objects_cross_android_test: SkipByDesign # Cross compilation is not tested on the Dart CI.
9+
test/clinker/treeshake_cross_android_test: SkipByDesign # Cross compilation is not tested on the Dart CI.
810
test/clinker/treeshake_cross_test: SkipByDesign # Cross compilation is not tested on the Dart CI.
911
test/native_toolchain/gcc_test: SkipByDesign # Cross compilation is not tested on the Dart CI.
1012
test/native_toolchain/ndk_test: SkipByDesign # Cross compilation is not tested on the Dart CI.

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CHANNEL dev
2727
MAJOR 3
2828
MINOR 9
2929
PATCH 0
30-
PRERELEASE 232
30+
PRERELEASE 233
3131
PRERELEASE_PATCH 0

0 commit comments

Comments
 (0)