-
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 df654c5 into dev
- Loading branch information
Showing
25 changed files
with
341 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2023, 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. | ||
|
||
extension type const ET3<T extends num>(int id) { | ||
const ET3.c1() : this(0); | ||
factory ET3.f1() = ET3.c1; | ||
} |
29 changes: 29 additions & 0 deletions
29
pkg/front_end/testcases/extension_types/generic_factory.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,29 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type ET3<T extends core::num>(core::int id) { | ||
constructor • = self::ET3|constructor#; | ||
constructor tearoff • = self::ET3|constructor#_#new#tearOff; | ||
constructor c1 = self::ET3|constructor#c1; | ||
constructor tearoff c1 = self::ET3|constructor#_#c1#tearOff; | ||
static redirecting-factory f1 = self::ET3|constructor#f1; | ||
static redirecting-factory tearoff f1 = self::ET3|constructor#_#f1#tearOff; | ||
} | ||
static inline-class-member method ET3|constructor#<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#::T> /* = core::int */ #this = id; | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#new#tearOff<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#_#new#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#<self::ET3|constructor#_#new#tearOff::T>(id); | ||
static inline-class-member method ET3|constructor#c1<T extends core::num>() → self::ET3<self::ET3|constructor#c1::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#c1::T> /* = core::int */ #this; | ||
#this = self::ET3|constructor#<self::ET3|constructor#c1::T>(0); | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#c1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#c1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<self::ET3|constructor#_#c1#tearOff::T>(); | ||
static inline-class-member method ET3|constructor#f1<T extends core::num>() → self::ET3<self::ET3|constructor#f1::T> /* = core::int */ /* redirection-target: self::ET3|constructor#c1<dynamic>*/ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
static inline-class-member method ET3|constructor#_#f1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#f1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<dynamic>(); |
35 changes: 35 additions & 0 deletions
35
pkg/front_end/testcases/extension_types/generic_factory.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,35 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type ET3<T extends core::num>(core::int id) { | ||
constructor • = self::ET3|constructor#; | ||
constructor tearoff • = self::ET3|constructor#_#new#tearOff; | ||
constructor c1 = self::ET3|constructor#c1; | ||
constructor tearoff c1 = self::ET3|constructor#_#c1#tearOff; | ||
static redirecting-factory f1 = self::ET3|constructor#f1; | ||
static redirecting-factory tearoff f1 = self::ET3|constructor#_#f1#tearOff; | ||
} | ||
static inline-class-member method ET3|constructor#<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#::T> /* = core::int */ #this = id; | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#new#tearOff<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#_#new#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#<self::ET3|constructor#_#new#tearOff::T>(id); | ||
static inline-class-member method ET3|constructor#c1<T extends core::num>() → self::ET3<self::ET3|constructor#c1::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#c1::T> /* = core::int */ #this; | ||
#this = self::ET3|constructor#<self::ET3|constructor#c1::T>(0); | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#c1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#c1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<self::ET3|constructor#_#c1#tearOff::T>(); | ||
static inline-class-member method ET3|constructor#f1<T extends core::num>() → self::ET3<self::ET3|constructor#f1::T> /* = core::int */ /* redirection-target: self::ET3|constructor#c1<dynamic>*/ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
static inline-class-member method ET3|constructor#_#f1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#f1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
|
||
|
||
Extra constant evaluation status: | ||
Evaluated: StaticInvocation @ org-dartlang-testcase:///generic_factory.dart:7:17 -> IntConstant(0) | ||
Evaluated: StaticInvocation @ org-dartlang-testcase:///generic_factory.dart:7:11 -> IntConstant(0) | ||
Extra constant evaluation: evaluated: 10, effectively constant: 2 |
4 changes: 4 additions & 0 deletions
4
pkg/front_end/testcases/extension_types/generic_factory.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,4 @@ | ||
extension type const ET3<T extends num>(int id) { | ||
const ET3.c1() : this(0); | ||
factory ET3.f1() = ET3.c1; | ||
} |
4 changes: 4 additions & 0 deletions
4
pkg/front_end/testcases/extension_types/generic_factory.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,4 @@ | ||
extension type const ET3<T extends num>(int id) { | ||
const ET3.c1() : this(0); | ||
factory ET3.f1() = ET3.c1; | ||
} |
29 changes: 29 additions & 0 deletions
29
pkg/front_end/testcases/extension_types/generic_factory.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,29 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type ET3<T extends core::num>(core::int id) { | ||
constructor • = self::ET3|constructor#; | ||
constructor tearoff • = self::ET3|constructor#_#new#tearOff; | ||
constructor c1 = self::ET3|constructor#c1; | ||
constructor tearoff c1 = self::ET3|constructor#_#c1#tearOff; | ||
static redirecting-factory f1 = self::ET3|constructor#f1; | ||
static redirecting-factory tearoff f1 = self::ET3|constructor#_#f1#tearOff; | ||
} | ||
static inline-class-member method ET3|constructor#<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#::T> /* = core::int */ #this = id; | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#new#tearOff<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#_#new#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#<self::ET3|constructor#_#new#tearOff::T>(id); | ||
static inline-class-member method ET3|constructor#c1<T extends core::num>() → self::ET3<self::ET3|constructor#c1::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#c1::T> /* = core::int */ #this; | ||
#this = self::ET3|constructor#<self::ET3|constructor#c1::T>(0); | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#c1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#c1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<self::ET3|constructor#_#c1#tearOff::T>(); | ||
static inline-class-member method ET3|constructor#f1<T extends core::num>() → self::ET3<self::ET3|constructor#f1::T> /* = core::int */ /* redirection-target: self::ET3|constructor#c1<dynamic>*/ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
static inline-class-member method ET3|constructor#_#f1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#f1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<dynamic>(); |
29 changes: 29 additions & 0 deletions
29
pkg/front_end/testcases/extension_types/generic_factory.dart.weak.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,29 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type ET3<T extends core::num>(core::int id) { | ||
constructor • = self::ET3|constructor#; | ||
constructor tearoff • = self::ET3|constructor#_#new#tearOff; | ||
constructor c1 = self::ET3|constructor#c1; | ||
constructor tearoff c1 = self::ET3|constructor#_#c1#tearOff; | ||
static redirecting-factory f1 = self::ET3|constructor#f1; | ||
static redirecting-factory tearoff f1 = self::ET3|constructor#_#f1#tearOff; | ||
} | ||
static inline-class-member method ET3|constructor#<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#::T> /* = core::int */ #this = id; | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#new#tearOff<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#_#new#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#<self::ET3|constructor#_#new#tearOff::T>(id); | ||
static inline-class-member method ET3|constructor#c1<T extends core::num>() → self::ET3<self::ET3|constructor#c1::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#c1::T> /* = core::int */ #this; | ||
#this = self::ET3|constructor#<self::ET3|constructor#c1::T>(0); | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#c1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#c1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<self::ET3|constructor#_#c1#tearOff::T>(); | ||
static inline-class-member method ET3|constructor#f1<T extends core::num>() → self::ET3<self::ET3|constructor#f1::T> /* = core::int */ /* redirection-target: self::ET3|constructor#c1<dynamic>*/ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
static inline-class-member method ET3|constructor#_#f1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#f1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<dynamic>(); |
24 changes: 24 additions & 0 deletions
24
pkg/front_end/testcases/extension_types/generic_factory.dart.weak.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,24 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type ET3<T extends core::num>(core::int id) { | ||
constructor • = self::ET3|constructor#; | ||
constructor tearoff • = self::ET3|constructor#_#new#tearOff; | ||
constructor c1 = self::ET3|constructor#c1; | ||
constructor tearoff c1 = self::ET3|constructor#_#c1#tearOff; | ||
static redirecting-factory f1 = self::ET3|constructor#f1; | ||
static redirecting-factory tearoff f1 = self::ET3|constructor#_#f1#tearOff; | ||
} | ||
static inline-class-member method ET3|constructor#<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#::T> /* = core::int */ | ||
; | ||
static inline-class-member method ET3|constructor#_#new#tearOff<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#_#new#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#<self::ET3|constructor#_#new#tearOff::T>(id); | ||
static inline-class-member method ET3|constructor#c1<T extends core::num>() → self::ET3<self::ET3|constructor#c1::T> /* = core::int */ | ||
; | ||
static inline-class-member method ET3|constructor#_#c1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#c1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<self::ET3|constructor#_#c1#tearOff::T>(); | ||
static inline-class-member method ET3|constructor#f1<T extends core::num>() → self::ET3<self::ET3|constructor#f1::T> /* = core::int */ /* redirection-target: self::ET3|constructor#c1<dynamic>*/ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
static inline-class-member method ET3|constructor#_#f1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#f1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<dynamic>(); |
35 changes: 35 additions & 0 deletions
35
pkg/front_end/testcases/extension_types/generic_factory.dart.weak.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,35 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type ET3<T extends core::num>(core::int id) { | ||
constructor • = self::ET3|constructor#; | ||
constructor tearoff • = self::ET3|constructor#_#new#tearOff; | ||
constructor c1 = self::ET3|constructor#c1; | ||
constructor tearoff c1 = self::ET3|constructor#_#c1#tearOff; | ||
static redirecting-factory f1 = self::ET3|constructor#f1; | ||
static redirecting-factory tearoff f1 = self::ET3|constructor#_#f1#tearOff; | ||
} | ||
static inline-class-member method ET3|constructor#<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#::T> /* = core::int */ #this = id; | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#new#tearOff<T extends core::num>(core::int id) → self::ET3<self::ET3|constructor#_#new#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#<self::ET3|constructor#_#new#tearOff::T>(id); | ||
static inline-class-member method ET3|constructor#c1<T extends core::num>() → self::ET3<self::ET3|constructor#c1::T> /* = core::int */ { | ||
lowered final self::ET3<self::ET3|constructor#c1::T> /* = core::int */ #this; | ||
#this = self::ET3|constructor#<self::ET3|constructor#c1::T>(0); | ||
return #this; | ||
} | ||
static inline-class-member method ET3|constructor#_#c1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#c1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<self::ET3|constructor#_#c1#tearOff::T>(); | ||
static inline-class-member method ET3|constructor#f1<T extends core::num>() → self::ET3<self::ET3|constructor#f1::T> /* = core::int */ /* redirection-target: self::ET3|constructor#c1<dynamic>*/ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
static inline-class-member method ET3|constructor#_#f1#tearOff<T extends core::num>() → self::ET3<self::ET3|constructor#_#f1#tearOff::T> /* = core::int */ | ||
return self::ET3|constructor#c1<dynamic>(); | ||
|
||
|
||
Extra constant evaluation status: | ||
Evaluated: StaticInvocation @ org-dartlang-testcase:///generic_factory.dart:7:17 -> IntConstant(0) | ||
Evaluated: StaticInvocation @ org-dartlang-testcase:///generic_factory.dart:7:11 -> IntConstant(0) | ||
Extra constant evaluation: evaluated: 10, effectively constant: 2 |
8 changes: 4 additions & 4 deletions
8
tools/canary.dart → ...testcases/extension_types/issue52595.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | ||
// Copyright (c) 2023, 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 main() { | ||
print("Success running the canary."); | ||
} | ||
extension type const V<T>(int id) {} | ||
|
||
const c = const V<int>(0); |
19 changes: 19 additions & 0 deletions
19
pkg/front_end/testcases/extension_types/issue52595.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,19 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type V<T extends core::Object? = dynamic>(core::int id) { | ||
constructor • = self::V|constructor#; | ||
constructor tearoff • = self::V|constructor#_#new#tearOff; | ||
} | ||
static const field self::V<core::int> /* = core::int */ c = #C1; | ||
static inline-class-member method V|constructor#<T extends core::Object? = dynamic>(core::int id) → self::V<self::V|constructor#::T%> /* = core::int */ { | ||
lowered final self::V<self::V|constructor#::T%> /* = core::int */ #this = id; | ||
return #this; | ||
} | ||
static inline-class-member method V|constructor#_#new#tearOff<T extends core::Object? = dynamic>(core::int id) → self::V<self::V|constructor#_#new#tearOff::T%> /* = core::int */ | ||
return self::V|constructor#<self::V|constructor#_#new#tearOff::T%>(id); | ||
|
||
constants { | ||
#C1 = 0 | ||
} |
19 changes: 19 additions & 0 deletions
19
pkg/front_end/testcases/extension_types/issue52595.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,19 @@ | ||
library; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
extension type V<T extends core::Object? = dynamic>(core::int id) { | ||
constructor • = self::V|constructor#; | ||
constructor tearoff • = self::V|constructor#_#new#tearOff; | ||
} | ||
static const field self::V<core::int> /* = core::int */ c = #C1; | ||
static inline-class-member method V|constructor#<T extends core::Object? = dynamic>(core::int id) → self::V<self::V|constructor#::T%> /* = core::int */ { | ||
lowered final self::V<self::V|constructor#::T%> /* = core::int */ #this = id; | ||
return #this; | ||
} | ||
static inline-class-member method V|constructor#_#new#tearOff<T extends core::Object? = dynamic>(core::int id) → self::V<self::V|constructor#_#new#tearOff::T%> /* = core::int */ | ||
return self::V|constructor#<self::V|constructor#_#new#tearOff::T%>(id); | ||
|
||
constants { | ||
#C1 = 0 | ||
} |
2 changes: 2 additions & 0 deletions
2
pkg/front_end/testcases/extension_types/issue52595.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 @@ | ||
extension type const V<T>(int id) {} | ||
const c = const V<int>(0); |
2 changes: 2 additions & 0 deletions
2
pkg/front_end/testcases/extension_types/issue52595.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,2 @@ | ||
const c = const V<int>(0); | ||
extension type const V<T>(int id) {} |
Oops, something went wrong.