Skip to content

Commit 7e58d82

Browse files
authored
Merge pull request #79619 from slavapestov/cleanups-from-optimize-optional-conversion
Small cleanups from "optimize optional conversion"
2 parents d452c40 + 8be3bee commit 7e58d82

16 files changed

+45
-61
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7523,13 +7523,6 @@ ERROR(result_builder_buildpartialblock_accumulated_not_accessible,none,
75237523
"expression shuffles the elements of this tuple; "
75247524
"this behavior is deprecated", ())
75257525

7526-
//------------------------------------------------------------------------------
7527-
// MARK: Implicit conversion diagnostics
7528-
//------------------------------------------------------------------------------
7529-
ERROR(cannot_implicitly_convert_in_optional_context,none,
7530-
"cannot implicitly convert value of type %0 to expected type %1",
7531-
(Type, Type))
7532-
75337526
//------------------------------------------------------------------------------
75347527
// MARK: marker protocol diagnostics
75357528
//------------------------------------------------------------------------------

include/swift/AST/SimpleRequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum class RequestFlags {
5757
/// incremental dependency pair and defines a new dependency scope.
5858
///
5959
/// This bit is optional. High-level requests
60-
/// (e.g. \c TypeCheckSourceFileRequest) will require it.
60+
/// (e.g. \c TypeCheckPrimaryFileRequest) will require it.
6161
///
6262
/// For further discussion on incremental dependencies
6363
/// see DependencyAnalysis.md.

include/swift/AST/TypeCheckRequests.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3300,9 +3300,9 @@ class ApplyAccessNoteRequest
33003300
void cacheResult(evaluator::SideEffect value) const;
33013301
};
33023302

3303-
class TypeCheckSourceFileRequest
3303+
class TypeCheckPrimaryFileRequest
33043304
: public SimpleRequest<
3305-
TypeCheckSourceFileRequest, evaluator::SideEffect(SourceFile *),
3305+
TypeCheckPrimaryFileRequest, evaluator::SideEffect(SourceFile *),
33063306
RequestFlags::SeparatelyCached | RequestFlags::DependencySource> {
33073307
public:
33083308
using SimpleRequest::SimpleRequest;

include/swift/AST/TypeCheckerTypeIDZone.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ SWIFT_REQUEST(TypeChecker, HasDefaultInitRequest,
424424
bool(NominalTypeDecl *), Cached, NoLocationInfo)
425425
SWIFT_REQUEST(TypeChecker, SynthesizeDefaultInitRequest,
426426
ConstructorDecl *(NominalTypeDecl *), Cached, NoLocationInfo)
427-
SWIFT_REQUEST(TypeChecker, TypeCheckSourceFileRequest,
427+
SWIFT_REQUEST(TypeChecker, TypeCheckPrimaryFileRequest,
428428
bool(SouceFile *), SeparatelyCached, NoLocationInfo)
429429
SWIFT_REQUEST(TypeChecker, ConformanceAccessScopeRequest,
430430
ConformanceAccessScope(DeclContext *, ProtocolDecl *),

include/swift/Sema/ConstraintLocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ class ConstraintLocatorBuilder {
12751275

12761276
auto last = std::find_if(
12771277
path.rbegin(), path.rend(), [](LocatorPathElt &elt) -> bool {
1278-
return elt.getKind() != ConstraintLocator::OptionalPayload &&
1278+
return elt.getKind() != ConstraintLocator::OptionalInjection &&
12791279
elt.getKind() != ConstraintLocator::GenericArgument;
12801280
});
12811281

include/swift/Sema/ConstraintLocatorPathElts.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ CUSTOM_LOCATOR_PATH_ELT(OpenedGeneric)
153153
/// type at the base of the locator.
154154
CUSTOM_LOCATOR_PATH_ELT(OpenedOpaqueArchetype)
155155

156-
/// An optional payload.
157-
SIMPLE_LOCATOR_PATH_ELT(OptionalPayload)
156+
/// The optional payload in an optional injection, ie a T -> T? conversion.
157+
SIMPLE_LOCATOR_PATH_ELT(OptionalInjection)
158158

159159
/// The parent of a nested type.
160160
SIMPLE_LOCATOR_PATH_ELT(ParentType)

lib/AST/TypeCheckRequests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,24 +1655,24 @@ void RenamedDeclRequest::cacheResult(ValueDecl *value) const {
16551655
}
16561656

16571657
//----------------------------------------------------------------------------//
1658-
// TypeCheckSourceFileRequest computation.
1658+
// TypeCheckPrimaryFileRequest computation.
16591659
//----------------------------------------------------------------------------//
16601660

1661-
evaluator::DependencySource TypeCheckSourceFileRequest::readDependencySource(
1661+
evaluator::DependencySource TypeCheckPrimaryFileRequest::readDependencySource(
16621662
const evaluator::DependencyRecorder &e) const {
16631663
return std::get<0>(getStorage());
16641664
}
16651665

16661666
std::optional<evaluator::SideEffect>
1667-
TypeCheckSourceFileRequest::getCachedResult() const {
1667+
TypeCheckPrimaryFileRequest::getCachedResult() const {
16681668
auto *SF = std::get<0>(getStorage());
16691669
if (SF->ASTStage == SourceFile::TypeChecked)
16701670
return std::make_tuple<>();
16711671

16721672
return std::nullopt;
16731673
}
16741674

1675-
void TypeCheckSourceFileRequest::cacheResult(evaluator::SideEffect) const {
1675+
void TypeCheckPrimaryFileRequest::cacheResult(evaluator::SideEffect) const {
16761676
auto *SF = std::get<0>(getStorage());
16771677

16781678
// Verify that we've checked types correctly.

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ bool GenericArgumentsMismatchFailure::diagnoseAsError() {
940940

941941
while (!path.empty()) {
942942
auto last = path.back();
943-
if (last.is<LocatorPathElt::OptionalPayload>() ||
943+
if (last.is<LocatorPathElt::OptionalInjection>() ||
944944
last.is<LocatorPathElt::GenericType>() ||
945945
last.is<LocatorPathElt::GenericArgument>()) {
946946
path = path.drop_back();
@@ -2837,22 +2837,6 @@ bool ContextualFailure::diagnoseAsError() {
28372837
break;
28382838
}
28392839

2840-
case ConstraintLocator::OptionalPayload: {
2841-
// If this is an attempt at a Double <-> CGFloat conversion
2842-
// through optional chaining, let's produce a tailored diagnostic.
2843-
if (isExpr<OptionalEvaluationExpr>(getAnchor())) {
2844-
if ((fromType->isDouble() || fromType->isCGFloat()) &&
2845-
(toType->isDouble() || toType->isCGFloat())) {
2846-
fromType = OptionalType::get(fromType);
2847-
toType = OptionalType::get(toType);
2848-
diagnostic = diag::cannot_implicitly_convert_in_optional_context;
2849-
break;
2850-
}
2851-
}
2852-
2853-
return false;
2854-
}
2855-
28562840
case ConstraintLocator::EnumPatternImplicitCastMatch: {
28572841
// In this case, the types are reversed, as we are checking whether we
28582842
// can convert the pattern type to the context type.

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4673,7 +4673,7 @@ generateForEachStmtConstraints(ConstraintSystem &cs, DeclContext *dc,
46734673
// Add a conversion constraint between the element type of the sequence
46744674
// and the type of the element pattern.
46754675
auto *elementTypeLoc = cs.getConstraintLocator(
4676-
elementLocator, ConstraintLocator::OptionalPayload);
4676+
elementLocator, ConstraintLocator::OptionalInjection);
46774677
auto elementType = cs.createTypeVariable(elementTypeLoc,
46784678
/*flags=*/0);
46794679
{

lib/Sema/CSSimplify.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3323,11 +3323,11 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
33233323
SmallVector<LocatorPathElt, 4> path;
33243324
locator.getLocatorParts(path);
33253325

3326-
// Find the last path element, skipping OptionalPayload elements
3326+
// Find the last path element, skipping OptionalInjection elements
33273327
// so that we allow this exception in cases of optional injection.
33283328
auto last = std::find_if(
33293329
path.rbegin(), path.rend(), [](LocatorPathElt &elt) -> bool {
3330-
return elt.getKind() != ConstraintLocator::OptionalPayload;
3330+
return elt.getKind() != ConstraintLocator::OptionalInjection;
33313331
});
33323332

33333333
auto &ctx = getASTContext();
@@ -3431,12 +3431,12 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
34313431

34323432
// Find the last path element, skipping GenericArgument elements
34333433
// so that we allow this exception in cases of optional types, and
3434-
// skipping OptionalPayload elements so that we allow this
3434+
// skipping OptionalInjection elements so that we allow this
34353435
// exception in cases of optional injection.
34363436
auto last = std::find_if(
34373437
path.rbegin(), path.rend(), [](LocatorPathElt &elt) -> bool {
34383438
return elt.getKind() != ConstraintLocator::GenericArgument &&
3439-
elt.getKind() != ConstraintLocator::OptionalPayload;
3439+
elt.getKind() != ConstraintLocator::OptionalInjection;
34403440
});
34413441

34423442
if (last != path.rend()) {
@@ -3484,7 +3484,7 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
34843484
//
34853485
// func foo(_: ((Int, Int) -> Void)?) {}
34863486
// _ = foo { _ in } <- missing second closure parameter.
3487-
if (loc->isLastElement<LocatorPathElt::OptionalPayload>()) {
3487+
if (loc->isLastElement<LocatorPathElt::OptionalInjection>()) {
34883488
auto path = loc->getPath();
34893489
loc = getConstraintLocator(loc->getAnchor(), path.drop_back());
34903490
}
@@ -4144,7 +4144,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
41444144
// `value-to-optional` or `optional-to-optional` conversion
41454145
// associated with them (expected argument is `AnyObject?`).
41464146
if (!path.empty() &&
4147-
(path.back().is<LocatorPathElt::OptionalPayload>() ||
4147+
(path.back().is<LocatorPathElt::OptionalInjection>() ||
41484148
path.back().is<LocatorPathElt::GenericArgument>()))
41494149
path.pop_back();
41504150

@@ -4200,7 +4200,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
42004200
// If the path ends at `optional payload` it means that this
42014201
// check is part of an implicit value-to-optional conversion,
42024202
// and it could be safely dropped.
4203-
if (!path.empty() && path.back().is<LocatorPathElt::OptionalPayload>())
4203+
if (!path.empty() && path.back().is<LocatorPathElt::OptionalInjection>())
42044204
path.pop_back();
42054205

42064206
// Determine whether this conformance mismatch is
@@ -6495,7 +6495,7 @@ bool ConstraintSystem::repairFailures(
64956495
// If the mismatch is a part of either optional-to-optional or
64966496
// value-to-optional conversions, let's allow fix refer to a complete
64976497
// top level type and not just a part of it.
6498-
if (tupleLocator->findLast<LocatorPathElt::OptionalPayload>())
6498+
if (tupleLocator->findLast<LocatorPathElt::OptionalInjection>())
64996499
break;
65006500

65016501
if (tupleLocator->isForContextualType()) {
@@ -6636,7 +6636,7 @@ bool ConstraintSystem::repairFailures(
66366636
break;
66376637
}
66386638

6639-
case ConstraintLocator::OptionalPayload: {
6639+
case ConstraintLocator::OptionalInjection: {
66406640
if (lhs->isPlaceholder() || rhs->isPlaceholder())
66416641
return true;
66426642

@@ -7446,7 +7446,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
74467446
// Look through all value-to-optional promotions to allow
74477447
// conversions like Double -> CGFloat?? and vice versa.
74487448
// T -> Optional<T>
7449-
if (location.endsWith<LocatorPathElt::OptionalPayload>() ||
7449+
if (location.endsWith<LocatorPathElt::OptionalInjection>() ||
74507450
location.endsWith<LocatorPathElt::GenericArgument>()) {
74517451
SmallVector<LocatorPathElt, 4> path;
74527452
auto anchor = location.getLocatorParts(path);
@@ -7456,7 +7456,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
74567456
path.erase(llvm::remove_if(
74577457
path,
74587458
[](const LocatorPathElt &elt) {
7459-
return elt.is<LocatorPathElt::OptionalPayload>() ||
7459+
return elt.is<LocatorPathElt::OptionalInjection>() ||
74607460
elt.is<LocatorPathElt::GenericArgument>();
74617461
}),
74627462
path.end());
@@ -14608,7 +14608,7 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
1460814608
if (generic2->getDecl()->isOptionalDecl()) {
1460914609
auto result = matchTypes(
1461014610
type1, generic2->getGenericArgs()[0], matchKind, subflags,
14611-
locator.withPathElement(ConstraintLocator::OptionalPayload));
14611+
locator.withPathElement(ConstraintLocator::OptionalInjection));
1461214612

1461314613
if (!(shouldAttemptFixes() && result.isFailure()))
1461414614
return result;

lib/Sema/ConstraintLocator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ unsigned LocatorPathElt::getNewSummaryFlags() const {
5252
case ConstraintLocator::ResultBuilderBodyResult:
5353
case ConstraintLocator::InstanceType:
5454
case ConstraintLocator::AutoclosureResult:
55-
case ConstraintLocator::OptionalPayload:
55+
case ConstraintLocator::OptionalInjection:
5656
case ConstraintLocator::Member:
5757
case ConstraintLocator::MemberRefBase:
5858
case ConstraintLocator::UnresolvedMember:
@@ -176,8 +176,8 @@ void LocatorPathElt::dump(raw_ostream &out) const {
176176
out << "apply function";
177177
break;
178178

179-
case ConstraintLocator::OptionalPayload:
180-
out << "optional payload";
179+
case ConstraintLocator::OptionalInjection:
180+
out << "optional injection";
181181
break;
182182

183183
case ConstraintLocator::ApplyArgToParam: {

lib/Sema/ConstraintSystem.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ ConstraintLocator *ConstraintSystem::getImplicitValueConversionLocator(
644644
// Drop any value-to-optional conversions that were applied along the
645645
// way to reach this one.
646646
while (!path.empty()) {
647-
if (path.back().is<LocatorPathElt::OptionalPayload>()) {
647+
if (path.back().is<LocatorPathElt::OptionalInjection>()) {
648648
path.pop_back();
649649
continue;
650650
}
@@ -3772,7 +3772,7 @@ void constraints::simplifyLocator(ASTNode &anchor,
37723772

37733773
case ConstraintLocator::Witness:
37743774
case ConstraintLocator::WrappedValue:
3775-
case ConstraintLocator::OptionalPayload:
3775+
case ConstraintLocator::OptionalInjection:
37763776
case ConstraintLocator::ImplicitlyUnwrappedDisjunctionChoice:
37773777
case ConstraintLocator::FallbackType:
37783778
case ConstraintLocator::KeyPathSubscriptIndex:
@@ -4068,7 +4068,7 @@ Solution::getFunctionArgApplyInfo(ConstraintLocator *locator) const {
40684068
// Look for the apply-arg-to-param element in the locator's path. We may
40694069
// have to look through other elements that are generated from an argument
40704070
// conversion such as GenericArgument for an optional-to-optional conversion,
4071-
// and OptionalPayload for a value-to-optional conversion.
4071+
// and OptionalInjection for a value-to-optional conversion.
40724072
auto iter = path.rbegin();
40734073
auto applyArgElt = locator->findLast<LocatorPathElt::ApplyArgToParam>(iter);
40744074
if (!applyArgElt)
@@ -4343,7 +4343,7 @@ bool ConstraintSystem::isArgumentOfImportedDecl(
43434343
// locator elements at the end of the path, they came from
43444344
// either value-to-optional promotion or optional-to-optional
43454345
// conversion.
4346-
if (last.is<LocatorPathElt::OptionalPayload>() ||
4346+
if (last.is<LocatorPathElt::OptionalInjection>() ||
43474347
last.is<LocatorPathElt::GenericArgument>()) {
43484348
path.pop_back();
43494349
continue;

lib/Sema/TypeCheckDeclPrimary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3991,7 +3991,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
39913991
return;
39923992
}
39933993

3994-
// Record a dependency from TypeCheckSourceFileRequest to
3994+
// Record a dependency from TypeCheckPrimaryFileRequest to
39953995
// ExtendedNominalRequest, since the call to getExtendedNominal()
39963996
// above doesn't record a dependency when reading a cached value.
39973997
ED->computeExtendedNominal();

lib/Sema/TypeChecker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,11 @@ void swift::performTypeChecking(SourceFile &SF) {
251251
}
252252

253253
return (void)evaluateOrDefault(SF.getASTContext().evaluator,
254-
TypeCheckSourceFileRequest{&SF}, {});
254+
TypeCheckPrimaryFileRequest{&SF}, {});
255255
}
256256

257257
evaluator::SideEffect
258-
TypeCheckSourceFileRequest::evaluate(Evaluator &eval, SourceFile *SF) const {
258+
TypeCheckPrimaryFileRequest::evaluate(Evaluator &eval, SourceFile *SF) const {
259259
assert(SF && "Source file cannot be null!");
260260
assert(SF->ASTStage != SourceFile::TypeChecked &&
261261
"Should not be re-typechecking this file!");

test/Constraints/implicit_double_cgfloat_conversion.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func test_returns_cgfloat(_: Double) -> CGFloat {
2020
let d: Double = 0.0
2121
let cgf: CGFloat = 0.0
2222

23-
// CHECK: test_various_situations_converting_to_cgfloat()
23+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion038test_various_situations_converting_to_C0yyF : $@convention(thin) () -> () {
2424
func test_various_situations_converting_to_cgfloat() {
2525
// CHECK: function_ref @$s12CoreGraphics7CGFloatVyACSdcfC : $@convention(method) (Double, @thin CGFloat.Type) -> CGFloat
2626
let _: CGFloat = d
@@ -58,6 +58,7 @@ func test_various_situations_converting_to_cgfloat() {
5858
test_to_cgfloat(test_returns_double(d)) // Two conversions
5959

6060
// Overloads with CGFloat are preferred if that allows to avoid any implicit conversions.
61+
// CHECK-LABEL: sil private [ossa] @$s34implicit_double_cgfloat_conversion038test_various_situations_converting_to_C0yyF0E23_loading_tuple_elementsL_6valuesy12CoreGraphics7CGFloatV_AGtz_tF : $@convention(thin) (@inout (CGFloat, CGFloat)) -> () {
6162
func test_loading_tuple_elements(values: inout (CGFloat, CGFloat)) {
6263
struct S {
6364
init(x: Double, y: Double) {}
@@ -69,7 +70,7 @@ func test_various_situations_converting_to_cgfloat() {
6970
}
7071
}
7172

72-
// CHECK: test_various_situations_converting_to_double()
73+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion038test_various_situations_converting_to_B0yyF : $@convention(thin) () -> () {
7374
func test_various_situations_converting_to_double() {
7475
// function_ref @$sSd12CoreGraphicsEySdAA7CGFloatVcfC : $@convention(method) (CGFloat, @thin Double.Type) -> Double
7576
let _: Double = cgf
@@ -102,12 +103,14 @@ func test_various_situations_converting_to_double() {
102103
test_from_cgfloat(test_returns_cgfloat(cgf)) // Two conversions - argument and result.
103104
}
104105

106+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion31test_conversions_with_optionals1vy12CoreGraphics7CGFloatVSg_tF : $@convention(thin) (Optional<CGFloat>) -> () {
105107
func test_conversions_with_optionals(v: CGFloat?) {
106108
// CHECK: function_ref @$s34implicit_double_cgfloat_conversion31test_conversions_with_optionals1vy12CoreGraphics7CGFloatVSg_tFAFyKXEfu_
107109
// CHECK: function_ref @$sSd12CoreGraphicsEySdAA7CGFloatVcfC : $@convention(method) (CGFloat, @thin Double.Type) -> Double
108110
let _: Double = (v ?? 0)
109111
}
110112

113+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion48test_static_members_are_contextually_convertibleyyF : $@convention(thin) () -> () {
111114
func test_static_members_are_contextually_convertible() {
112115
struct S {
113116
static var testProp: CGFloat { 42 }
@@ -125,6 +128,7 @@ func test_static_members_are_contextually_convertible() {
125128
}
126129
}
127130

131+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion25test_narrowing_is_delayed1x1yySd_12CoreGraphics7CGFloatVtF : $@convention(thin) (Double, CGFloat) -> () {
128132
func test_narrowing_is_delayed(x: Double, y: CGFloat) {
129133
func test(_: CGFloat) {}
130134

@@ -181,6 +185,7 @@ extension CGFloat {
181185
}
182186

183187
// Make sure that solution with no Double/CGFloat conversions is preferred
188+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion38test_no_ambiguity_with_unary_operators5width6heighty12CoreGraphics7CGFloatV_AGtF : $@convention(thin) (CGFloat, CGFloat) -> () {
184189
func test_no_ambiguity_with_unary_operators(width: CGFloat, height: CGFloat) {
185190
struct R {
186191
init(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat) {}
@@ -193,6 +198,7 @@ func test_no_ambiguity_with_unary_operators(width: CGFloat, height: CGFloat) {
193198
_ = R(x: width / 4, y: -height / 2, width: width, height: height)
194199
}
195200

201+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion40test_conversions_with_optional_promotion1d3cgfySd_12CoreGraphics7CGFloatVtF : $@convention(thin) (Double, CGFloat) -> () {
196202
func test_conversions_with_optional_promotion(d: Double, cgf: CGFloat) {
197203
func test_double(_: Double??, _: Double???) {}
198204
func test_cgfloat(_: CGFloat??, _: CGFloat???) {}
@@ -332,6 +338,7 @@ func test_implicit_conversion_clash_with_partial_application_check() {
332338
}
333339

334340
// rdar://99352676
341+
// CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion20test_init_validationyyF : $@convention(thin) () -> () {
335342
func test_init_validation() {
336343
class Foo {
337344
static let bar = 100.0

test/Frontend/debug-cycles.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Outer2: Outer2.Inner {
55
class Inner {}
66
}
77
// CHECK:===CYCLE DETECTED===
8-
// CHECK-NEXT: `--TypeCheckSourceFileRequest({{.*}})
8+
// CHECK-NEXT: `--TypeCheckPrimaryFileRequest({{.*}})
99
// CHECK-NEXT: `--SuperclassDeclRequest({{.*}})
1010
// CHECK-NEXT: `--InheritedDeclsReferencedRequest({{.*}})
1111
// CHECK-NEXT: `--QualifiedLookupRequest({{.*}})

0 commit comments

Comments
 (0)