-
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 d35cbca into dev
- Loading branch information
Showing
12 changed files
with
218 additions
and
3 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
14 changes: 14 additions & 0 deletions
14
...stcases/general/super_initializing_parameters_in_redirecting_generative_constructors.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,14 @@ | ||
// Copyright (c) 2024, 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 A { | ||
int x; | ||
A(this.x); | ||
} | ||
|
||
class C extends A { | ||
C(super._); | ||
C.r(super._) : this(0); // Error. | ||
factory C.r2(super._) = C; // Error. | ||
} |
40 changes: 40 additions & 0 deletions
40
...l/super_initializing_parameters_in_redirecting_generative_constructors.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,40 @@ | ||
library; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:12:13: Error: Super parameters can only be used in non-redirecting generative constructors. | ||
// C.r(super._) : this(0); // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
// - 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
// factory C.r2(super._) = C; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:16: Error: Super-initializer formal parameters can only be used in generative constructors. | ||
// Try removing 'super.'. | ||
// factory C.r2(super._) = C; // Error. | ||
// ^^^^^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
class A extends core::Object { | ||
field core::int x; | ||
constructor •(core::int x) → self::A | ||
: self::A::x = x, super core::Object::•() | ||
; | ||
} | ||
class C extends self::A { | ||
constructor •(core::int _) → self::C | ||
: super self::A::•(_) | ||
; | ||
constructor r(core::int _) → self::C | ||
: this self::C::•(0) | ||
; | ||
static factory r2(dynamic _) → self::C | ||
return invalid-expression "pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
- 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
factory C.r2(super._) = C; // Error. | ||
^"; | ||
} |
40 changes: 40 additions & 0 deletions
40
...initializing_parameters_in_redirecting_generative_constructors.dart.strong.modular.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,40 @@ | ||
library; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:12:13: Error: Super parameters can only be used in non-redirecting generative constructors. | ||
// C.r(super._) : this(0); // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
// - 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
// factory C.r2(super._) = C; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:16: Error: Super-initializer formal parameters can only be used in generative constructors. | ||
// Try removing 'super.'. | ||
// factory C.r2(super._) = C; // Error. | ||
// ^^^^^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
class A extends core::Object { | ||
field core::int x; | ||
constructor •(core::int x) → self::A | ||
: self::A::x = x, super core::Object::•() | ||
; | ||
} | ||
class C extends self::A { | ||
constructor •(core::int _) → self::C | ||
: super self::A::•(_) | ||
; | ||
constructor r(core::int _) → self::C | ||
: this self::C::•(0) | ||
; | ||
static factory r2(dynamic _) → self::C | ||
return invalid-expression "pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
- 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
factory C.r2(super._) = C; // Error. | ||
^"; | ||
} |
32 changes: 32 additions & 0 deletions
32
...initializing_parameters_in_redirecting_generative_constructors.dart.strong.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,32 @@ | ||
library; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:12:13: Error: Super parameters can only be used in non-redirecting generative constructors. | ||
// C.r(super._) : this(0); // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
// - 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
// factory C.r2(super._) = C; // Error. | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
class A extends core::Object { | ||
field core::int x; | ||
constructor •(core::int x) → self::A | ||
; | ||
} | ||
class C extends self::A { | ||
constructor •(core::int _) → self::C | ||
; | ||
constructor r(core::int _) → self::C | ||
; | ||
static factory r2(dynamic _) → self::C | ||
return invalid-expression "pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
- 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
factory C.r2(super._) = C; // Error. | ||
^"; | ||
} |
40 changes: 40 additions & 0 deletions
40
...ializing_parameters_in_redirecting_generative_constructors.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,40 @@ | ||
library; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:12:13: Error: Super parameters can only be used in non-redirecting generative constructors. | ||
// C.r(super._) : this(0); // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
// - 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
// factory C.r2(super._) = C; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:16: Error: Super-initializer formal parameters can only be used in generative constructors. | ||
// Try removing 'super.'. | ||
// factory C.r2(super._) = C; // Error. | ||
// ^^^^^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
class A extends core::Object { | ||
field core::int x; | ||
constructor •(core::int x) → self::A | ||
: self::A::x = x, super core::Object::•() | ||
; | ||
} | ||
class C extends self::A { | ||
constructor •(core::int _) → self::C | ||
: super self::A::•(_) | ||
; | ||
constructor r(core::int _) → self::C | ||
: this self::C::•(0) | ||
; | ||
static factory r2(dynamic _) → self::C | ||
return invalid-expression "pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart:13:27: Error: The constructor function type 'C Function(int)' isn't a subtype of 'C Function(dynamic)'. | ||
- 'C' is from 'pkg/front_end/testcases/general/super_initializing_parameters_in_redirecting_generative_constructors.dart'. | ||
factory C.r2(super._) = C; // Error. | ||
^"; | ||
} |
10 changes: 10 additions & 0 deletions
10
...nitializing_parameters_in_redirecting_generative_constructors.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,10 @@ | ||
class A { | ||
int x; | ||
A(this.x); | ||
} | ||
|
||
class C extends A { | ||
C(super._); | ||
C.r(super._) : this(0); | ||
factory C.r2(super._) = C; | ||
} |
10 changes: 10 additions & 0 deletions
10
...ng_parameters_in_redirecting_generative_constructors.dart.textual_outline_modelled.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,10 @@ | ||
class A { | ||
A(this.x); | ||
int x; | ||
} | ||
|
||
class C extends A { | ||
C(super._); | ||
C.r(super._) : this(0); | ||
factory C.r2(super._) = C; | ||
} |
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 |
---|---|---|
|
@@ -27,5 +27,5 @@ CHANNEL dev | |
MAJOR 3 | ||
MINOR 6 | ||
PATCH 0 | ||
PRERELEASE 12 | ||
PRERELEASE 13 | ||
PRERELEASE_PATCH 0 |