-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 3e6050a into dev
- Loading branch information
Showing
29 changed files
with
380 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
pkg/front_end/testcases/records/structurally_constant.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) 2022, 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. | ||
|
||
void method1([a = (0, 1), b = (const <String>[], c: 'foo')]) { | ||
(0, 1); // Const | ||
(const <String>[], c: 'foo'); // Const | ||
} | ||
|
||
void method2({a = (0, 1), b = (const <String>[], c: 'foo')}) { | ||
(<String>[], c: 'foo'); // Non-const | ||
} |
20 changes: 20 additions & 0 deletions
20
pkg/front_end/testcases/records/structurally_constant.dart.strong.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
library /*isNonNullableByDefault*/; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method method1([dynamic a = #C3, dynamic b = #C6]) → void { | ||
(0, 1); | ||
(#C4, {c: "foo"}); | ||
} | ||
static method method2({dynamic a = #C3, dynamic b = #C6}) → void { | ||
(<core::String>[], {c: "foo"}); | ||
} | ||
|
||
constants { | ||
#C1 = 0 | ||
#C2 = 1 | ||
const (#C1, #C2) | ||
#C4 = <core::String>[] | ||
#C5 = "foo" | ||
const (#C4, {c:#C5}) | ||
} |
25 changes: 25 additions & 0 deletions
25
pkg/front_end/testcases/records/structurally_constant.dart.strong.transformed.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
library /*isNonNullableByDefault*/; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method method1([dynamic a = #C3, dynamic b = #C6]) → void { | ||
(0, 1); | ||
(#C4, {c: "foo"}); | ||
} | ||
static method method2({dynamic a = #C3, dynamic b = #C6}) → void { | ||
(core::_GrowableList::•<core::String>(0), {c: "foo"}); | ||
} | ||
|
||
constants { | ||
#C1 = 0 | ||
#C2 = 1 | ||
const (#C1, #C2) | ||
#C4 = <core::String>[] | ||
#C5 = "foo" | ||
const (#C4, {c:#C5}) | ||
} | ||
|
||
Extra constant evaluation status: | ||
Evaluated: RecordLiteral @ org-dartlang-testcase:///structurally_constant.dart:6:9 -> RecordConstant(const (0, 1)) | ||
Evaluated: RecordLiteral @ org-dartlang-testcase:///structurally_constant.dart:7:31 -> RecordConstant(const (const <String>[], {c: "foo"})) | ||
Extra constant evaluation: evaluated: 4, effectively constant: 2 |
2 changes: 2 additions & 0 deletions
2
pkg/front_end/testcases/records/structurally_constant.dart.textual_outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
void method1([a = (0, 1), b = (const <String>[], c: 'foo')]) {} | ||
void method2({a = (0, 1), b = (const <String>[], c: 'foo')}) {} |
20 changes: 20 additions & 0 deletions
20
pkg/front_end/testcases/records/structurally_constant.dart.weak.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
library /*isNonNullableByDefault*/; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method method1([dynamic a = #C3, dynamic b = #C6]) → void { | ||
(0, 1); | ||
(#C4, {c: "foo"}); | ||
} | ||
static method method2({dynamic a = #C3, dynamic b = #C6}) → void { | ||
(<core::String>[], {c: "foo"}); | ||
} | ||
|
||
constants { | ||
#C1 = 0 | ||
#C2 = 1 | ||
const (#C1, #C2) | ||
#C4 = <core::String*>[] | ||
#C5 = "foo" | ||
const (#C4, {c:#C5}) | ||
} |
Oops, something went wrong.