Skip to content

Commit 8ddfcbd

Browse files
mkustermannCommit Queue
authored andcommitted
[dart2wasm] Use String as return type of Record_<X>.toString()
This will ensure selector computation for `toString()` selector will use more precise type. Change-Id: I668197e58d25ac225fd8428dfaa5093e9090de2e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431041 Reviewed-by: Slava Egorov <[email protected]> Commit-Queue: Martin Kustermann <[email protected]>
1 parent fe46d20 commit 8ddfcbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/dart2wasm/lib/record_class_generator.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ class _RecordClassGenerator {
395395
Procedure(
396396
Name('toString', library),
397397
ProcedureKind.Method,
398-
FunctionNode(ReturnStatement(stringExpression)),
398+
FunctionNode(ReturnStatement(stringExpression),
399+
returnType: coreTypes.stringNonNullableRawType),
399400
fileUri: library.fileUri,
400401
),
401402
coreTypes);

0 commit comments

Comments
 (0)