Skip to content

Commit 3fbdc0b

Browse files
authored
Merge pull request #3354 from rudkx/fix-26894118
2 parents 47dbd2f + d80cefc commit 3fbdc0b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/Sema/CodeSynthesis.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@ void TypeChecker::completeLazyVarImplementation(VarDecl *VD) {
16251625

16261626
// Now that we've got the storage squared away, synthesize the getter.
16271627
auto *Get = completeLazyPropertyGetter(VD, Storage, *this);
1628+
validateDecl(Get);
16281629

16291630
// The setter just forwards on to storage without materializing the initial
16301631
// value.
@@ -1643,12 +1644,6 @@ void TypeChecker::completeLazyVarImplementation(VarDecl *VD) {
16431644
Storage->setImplicit();
16441645
Storage->setAccessibility(Accessibility::Private);
16451646
Storage->setSetterAccessibility(Accessibility::Private);
1646-
1647-
typeCheckDecl(Get, true);
1648-
typeCheckDecl(Get, false);
1649-
1650-
typeCheckDecl(Set, true);
1651-
typeCheckDecl(Set, false);
16521647
}
16531648

16541649

test/Sema/Inputs/forbid_typecheck_2.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ class NOTYPECHECK_cls {}
88

99
class ClsSec {
1010
let member : Int = NOTYPECHECK_member
11+
lazy var lazymember: Int = NOTYPECHECK_lazymember
1112
}

0 commit comments

Comments
 (0)