Skip to content

Commit 190040d

Browse files
author
Dart CI
committed
Version 2.19.0-392.0.dev
Merge 6ddd146 into dev
2 parents 7820584 + 6ddd146 commit 190040d

15 files changed

+187
-92
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ vars = {
6666
# Checkout extra javascript engines for testing or benchmarking.
6767
# d8, the V8 shell, is always checked out.
6868
"checkout_javascript_engines": False,
69-
"d8_tag": "version:10.7.157",
69+
"d8_tag": "version:10.9.104",
7070
"jsshell_tag": "version:95.0",
7171

7272
# As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision

pkg/analyzer/lib/dart/constant/value.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ abstract class DartObject {
136136
/// or `null` if
137137
/// * this object is not of type 'Symbol', or
138138
/// * the value of the object being represented is `null`.
139-
/// (We return the string
140139
String? toSymbolValue();
141140

142141
/// Return the representation of the type corresponding to the value of the

pkg/dart2wasm/bin/run_wasm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// Run as follows:
88
//
9-
// $> d8 --experimental-wasm-gc --wasm-gc-js-interop --experimental-wasm-stack-switching --experimental-wasm-type-reflection run_wasm.js -- <dart_module>.wasm [<ffi_module>.wasm]
9+
// $> d8 --experimental-wasm-gc --experimental-wasm-stack-switching --experimental-wasm-type-reflection run_wasm.js -- <dart_module>.wasm [<ffi_module>.wasm]
1010
//
1111
// If an FFI module is specified, it will be instantiated first, and its
1212
// exports will be supplied as imports to the Dart module under the 'ffi'

pkg/dart2wasm/dart2wasm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ where *options* include:
2525

2626
The resulting `.wasm` file can be run with:
2727

28-
`d8 --experimental-wasm-gc --wasm-gc-js-interop --experimental-wasm-stack-switching --experimental-wasm-type-reflection pkg/dart2wasm/bin/run_wasm.js -- `*outfile*`.wasm`
28+
`d8 --experimental-wasm-gc --experimental-wasm-stack-switching --experimental-wasm-type-reflection pkg/dart2wasm/bin/run_wasm.js -- `*outfile*`.wasm`
2929

3030
## Imports and exports
3131

pkg/front_end/lib/src/fasta/builder/record_type_builder.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ abstract class RecordTypeBuilder extends TypeBuilder {
154154
hasErrors = true;
155155
continue;
156156
}
157+
if (forbiddenObjectMemberNames.contains(fieldName)) {
158+
library.addProblem(messageObjectMemberNameUsedForRecordField,
159+
field.charOffset, fieldName.length, fileUri);
160+
hasErrors = true;
161+
continue;
162+
}
157163
RecordTypeFieldBuilder? existingField = fieldsMap[fieldName];
158164
if (existingField != null) {
159165
library.addProblem(

pkg/front_end/testcases/records/restricted_object_member_names.dart

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// 'Object' member names are allowed as the names of the positional fields in
6-
// record types because they don't introduce getters with those names.
7-
(int hashCode,) foo1() => throw 0; // Ok.
8-
(int runtimeType,) foo2() => throw 0; // Ok.
9-
(int noSuchMethod,) foo3() => throw 0; // Ok.
10-
(int toString,) foo4() => throw 0; // Ok.
11-
12-
// 'Object' member names are forbidden as names of the named record fields in
13-
// both record types and literals.
5+
(int hashCode,) foo1() => throw 0; // Error.
6+
(int runtimeType,) foo2() => throw 0; // Error.
7+
(int noSuchMethod,) foo3() => throw 0; // Error.
8+
(int toString,) foo4() => throw 0; // Error.
149
({int hashCode}) foo5() => throw 0; // Error.
1510
({int runtimeType}) foo6() => throw 0; // Error.
1611
({int noSuchMethod}) foo7() => throw 0; // Error.

pkg/front_end/testcases/records/restricted_object_member_names.dart.strong.expect

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,64 @@ library /*isNonNullableByDefault*/;
22
//
33
// Problems in library:
44
//
5-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:14:7: Error: Record field names can't be the same as a member from 'Object'.
5+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:5:6: Error: Record field names can't be the same as a member from 'Object'.
6+
// (int hashCode,) foo1() => throw 0; // Error.
7+
// ^^^^^^^^
8+
//
9+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:6:6: Error: Record field names can't be the same as a member from 'Object'.
10+
// (int runtimeType,) foo2() => throw 0; // Error.
11+
// ^^^^^^^^^^^
12+
//
13+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:7:6: Error: Record field names can't be the same as a member from 'Object'.
14+
// (int noSuchMethod,) foo3() => throw 0; // Error.
15+
// ^^^^^^^^^^^^
16+
//
17+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:8:6: Error: Record field names can't be the same as a member from 'Object'.
18+
// (int toString,) foo4() => throw 0; // Error.
19+
// ^^^^^^^^
20+
//
21+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:9:7: Error: Record field names can't be the same as a member from 'Object'.
622
// ({int hashCode}) foo5() => throw 0; // Error.
723
// ^^^^^^^^
824
//
9-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:15:7: Error: Record field names can't be the same as a member from 'Object'.
25+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:10:7: Error: Record field names can't be the same as a member from 'Object'.
1026
// ({int runtimeType}) foo6() => throw 0; // Error.
1127
// ^^^^^^^^^^^
1228
//
13-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:16:7: Error: Record field names can't be the same as a member from 'Object'.
29+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:11:7: Error: Record field names can't be the same as a member from 'Object'.
1430
// ({int noSuchMethod}) foo7() => throw 0; // Error.
1531
// ^^^^^^^^^^^^
1632
//
17-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:17:7: Error: Record field names can't be the same as a member from 'Object'.
33+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:12:7: Error: Record field names can't be the same as a member from 'Object'.
1834
// ({int toString}) foo8() => throw 0; // Error.
1935
// ^^^^^^^^
2036
//
21-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:18:12: Error: Record field names can't be the same as a member from 'Object'.
37+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:13:12: Error: Record field names can't be the same as a member from 'Object'.
2238
// foo9() => (hashCode: 1); // Error.
2339
// ^^^^^^^^
2440
//
25-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:19:13: Error: Record field names can't be the same as a member from 'Object'.
41+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:14:13: Error: Record field names can't be the same as a member from 'Object'.
2642
// foo10() => (runtimeType: 1); // Error.
2743
// ^^^^^^^^^^^
2844
//
29-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:20:13: Error: Record field names can't be the same as a member from 'Object'.
45+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:15:13: Error: Record field names can't be the same as a member from 'Object'.
3046
// foo11() => (noSuchMethod: 1); // Error.
3147
// ^^^^^^^^^^^^
3248
//
33-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:21:13: Error: Record field names can't be the same as a member from 'Object'.
49+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:16:13: Error: Record field names can't be the same as a member from 'Object'.
3450
// foo12() => (toString: 1); // Error.
3551
// ^^^^^^^^
3652
//
3753
import self as self;
3854
import "dart:core" as core;
3955

40-
static method foo1() → (core::int)
56+
static method foo1() → invalid-type
4157
return throw 0;
42-
static method foo2() → (core::int)
58+
static method foo2() → invalid-type
4359
return throw 0;
44-
static method foo3() → (core::int)
60+
static method foo3() → invalid-type
4561
return throw 0;
46-
static method foo4() → (core::int)
62+
static method foo4() → invalid-type
4763
return throw 0;
4864
static method foo5() → invalid-type
4965
return throw 0;

pkg/front_end/testcases/records/restricted_object_member_names.dart.strong.transformed.expect

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,64 @@ library /*isNonNullableByDefault*/;
22
//
33
// Problems in library:
44
//
5-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:14:7: Error: Record field names can't be the same as a member from 'Object'.
5+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:5:6: Error: Record field names can't be the same as a member from 'Object'.
6+
// (int hashCode,) foo1() => throw 0; // Error.
7+
// ^^^^^^^^
8+
//
9+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:6:6: Error: Record field names can't be the same as a member from 'Object'.
10+
// (int runtimeType,) foo2() => throw 0; // Error.
11+
// ^^^^^^^^^^^
12+
//
13+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:7:6: Error: Record field names can't be the same as a member from 'Object'.
14+
// (int noSuchMethod,) foo3() => throw 0; // Error.
15+
// ^^^^^^^^^^^^
16+
//
17+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:8:6: Error: Record field names can't be the same as a member from 'Object'.
18+
// (int toString,) foo4() => throw 0; // Error.
19+
// ^^^^^^^^
20+
//
21+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:9:7: Error: Record field names can't be the same as a member from 'Object'.
622
// ({int hashCode}) foo5() => throw 0; // Error.
723
// ^^^^^^^^
824
//
9-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:15:7: Error: Record field names can't be the same as a member from 'Object'.
25+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:10:7: Error: Record field names can't be the same as a member from 'Object'.
1026
// ({int runtimeType}) foo6() => throw 0; // Error.
1127
// ^^^^^^^^^^^
1228
//
13-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:16:7: Error: Record field names can't be the same as a member from 'Object'.
29+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:11:7: Error: Record field names can't be the same as a member from 'Object'.
1430
// ({int noSuchMethod}) foo7() => throw 0; // Error.
1531
// ^^^^^^^^^^^^
1632
//
17-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:17:7: Error: Record field names can't be the same as a member from 'Object'.
33+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:12:7: Error: Record field names can't be the same as a member from 'Object'.
1834
// ({int toString}) foo8() => throw 0; // Error.
1935
// ^^^^^^^^
2036
//
21-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:18:12: Error: Record field names can't be the same as a member from 'Object'.
37+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:13:12: Error: Record field names can't be the same as a member from 'Object'.
2238
// foo9() => (hashCode: 1); // Error.
2339
// ^^^^^^^^
2440
//
25-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:19:13: Error: Record field names can't be the same as a member from 'Object'.
41+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:14:13: Error: Record field names can't be the same as a member from 'Object'.
2642
// foo10() => (runtimeType: 1); // Error.
2743
// ^^^^^^^^^^^
2844
//
29-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:20:13: Error: Record field names can't be the same as a member from 'Object'.
45+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:15:13: Error: Record field names can't be the same as a member from 'Object'.
3046
// foo11() => (noSuchMethod: 1); // Error.
3147
// ^^^^^^^^^^^^
3248
//
33-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:21:13: Error: Record field names can't be the same as a member from 'Object'.
49+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:16:13: Error: Record field names can't be the same as a member from 'Object'.
3450
// foo12() => (toString: 1); // Error.
3551
// ^^^^^^^^
3652
//
3753
import self as self;
3854
import "dart:core" as core;
3955

40-
static method foo1() → (core::int)
56+
static method foo1() → invalid-type
4157
return throw 0;
42-
static method foo2() → (core::int)
58+
static method foo2() → invalid-type
4359
return throw 0;
44-
static method foo3() → (core::int)
60+
static method foo3() → invalid-type
4561
return throw 0;
46-
static method foo4() → (core::int)
62+
static method foo4() → invalid-type
4763
return throw 0;
4864
static method foo5() → invalid-type
4965
return throw 0;
@@ -65,8 +81,8 @@ static method main() → dynamic {}
6581

6682

6783
Extra constant evaluation status:
68-
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:18:11 -> RecordConstant(const ({hashCode: 1}))
69-
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:19:12 -> RecordConstant(const ({runtimeType: 1}))
70-
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:20:12 -> RecordConstant(const ({noSuchMethod: 1}))
71-
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:21:12 -> RecordConstant(const ({toString: 1}))
84+
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:13:11 -> RecordConstant(const ({hashCode: 1}))
85+
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:14:12 -> RecordConstant(const ({runtimeType: 1}))
86+
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:15:12 -> RecordConstant(const ({noSuchMethod: 1}))
87+
Evaluated: RecordLiteral @ org-dartlang-testcase:///restricted_object_member_names.dart:16:12 -> RecordConstant(const ({toString: 1}))
7288
Extra constant evaluation: evaluated: 12, effectively constant: 4

pkg/front_end/testcases/records/restricted_object_member_names.dart.weak.expect

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,64 @@ library /*isNonNullableByDefault*/;
22
//
33
// Problems in library:
44
//
5-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:14:7: Error: Record field names can't be the same as a member from 'Object'.
5+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:5:6: Error: Record field names can't be the same as a member from 'Object'.
6+
// (int hashCode,) foo1() => throw 0; // Error.
7+
// ^^^^^^^^
8+
//
9+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:6:6: Error: Record field names can't be the same as a member from 'Object'.
10+
// (int runtimeType,) foo2() => throw 0; // Error.
11+
// ^^^^^^^^^^^
12+
//
13+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:7:6: Error: Record field names can't be the same as a member from 'Object'.
14+
// (int noSuchMethod,) foo3() => throw 0; // Error.
15+
// ^^^^^^^^^^^^
16+
//
17+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:8:6: Error: Record field names can't be the same as a member from 'Object'.
18+
// (int toString,) foo4() => throw 0; // Error.
19+
// ^^^^^^^^
20+
//
21+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:9:7: Error: Record field names can't be the same as a member from 'Object'.
622
// ({int hashCode}) foo5() => throw 0; // Error.
723
// ^^^^^^^^
824
//
9-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:15:7: Error: Record field names can't be the same as a member from 'Object'.
25+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:10:7: Error: Record field names can't be the same as a member from 'Object'.
1026
// ({int runtimeType}) foo6() => throw 0; // Error.
1127
// ^^^^^^^^^^^
1228
//
13-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:16:7: Error: Record field names can't be the same as a member from 'Object'.
29+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:11:7: Error: Record field names can't be the same as a member from 'Object'.
1430
// ({int noSuchMethod}) foo7() => throw 0; // Error.
1531
// ^^^^^^^^^^^^
1632
//
17-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:17:7: Error: Record field names can't be the same as a member from 'Object'.
33+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:12:7: Error: Record field names can't be the same as a member from 'Object'.
1834
// ({int toString}) foo8() => throw 0; // Error.
1935
// ^^^^^^^^
2036
//
21-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:18:12: Error: Record field names can't be the same as a member from 'Object'.
37+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:13:12: Error: Record field names can't be the same as a member from 'Object'.
2238
// foo9() => (hashCode: 1); // Error.
2339
// ^^^^^^^^
2440
//
25-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:19:13: Error: Record field names can't be the same as a member from 'Object'.
41+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:14:13: Error: Record field names can't be the same as a member from 'Object'.
2642
// foo10() => (runtimeType: 1); // Error.
2743
// ^^^^^^^^^^^
2844
//
29-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:20:13: Error: Record field names can't be the same as a member from 'Object'.
45+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:15:13: Error: Record field names can't be the same as a member from 'Object'.
3046
// foo11() => (noSuchMethod: 1); // Error.
3147
// ^^^^^^^^^^^^
3248
//
33-
// pkg/front_end/testcases/records/restricted_object_member_names.dart:21:13: Error: Record field names can't be the same as a member from 'Object'.
49+
// pkg/front_end/testcases/records/restricted_object_member_names.dart:16:13: Error: Record field names can't be the same as a member from 'Object'.
3450
// foo12() => (toString: 1); // Error.
3551
// ^^^^^^^^
3652
//
3753
import self as self;
3854
import "dart:core" as core;
3955

40-
static method foo1() → (core::int)
56+
static method foo1() → invalid-type
4157
return throw 0;
42-
static method foo2() → (core::int)
58+
static method foo2() → invalid-type
4359
return throw 0;
44-
static method foo3() → (core::int)
60+
static method foo3() → invalid-type
4561
return throw 0;
46-
static method foo4() → (core::int)
62+
static method foo4() → invalid-type
4763
return throw 0;
4864
static method foo5() → invalid-type
4965
return throw 0;

0 commit comments

Comments
 (0)