Skip to content

Commit 613f84e

Browse files
committed
---
yaml --- r: 347610 b: refs/heads/master c: 689f54d h: refs/heads/master
1 parent 6ea0531 commit 613f84e

File tree

6 files changed

+142
-304
lines changed

6 files changed

+142
-304
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 080b199201c9f34b4a4ec7ee5c1d09e0ff640e98
2+
refs/heads/master: 689f54db771cc86bf7c796bd0860671af9c8215d
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/Sema/TypeCheckDecl.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4009,16 +4009,7 @@ void TypeChecker::validateDecl(ValueDecl *D) {
40094009
}
40104010
}
40114011

4012-
// If we have generic parameters, check the generic signature now.
4013-
if (FD->getGenericParams() || !isa<AccessorDecl>(FD)) {
4014-
validateGenericFuncSignature(FD);
4015-
} else {
4016-
// We've inherited all of the type information already.
4017-
FD->setGenericEnvironment(
4018-
FD->getDeclContext()->getGenericEnvironmentOfContext());
4019-
4020-
FD->computeType();
4021-
}
4012+
validateGenericFuncOrSubscriptSignature(FD, FD, FD);
40224013

40234014
if (!isa<AccessorDecl>(FD) || cast<AccessorDecl>(FD)->isGetter()) {
40244015
auto *TyR = getTypeLocForFunctionResult(FD).getTypeRepr();
@@ -4132,7 +4123,7 @@ void TypeChecker::validateDecl(ValueDecl *D) {
41324123
}
41334124
}
41344125

4135-
validateGenericFuncSignature(CD);
4126+
validateGenericFuncOrSubscriptSignature(CD, CD, CD);
41364127

41374128
// We want the constructor to be available for name lookup as soon
41384129
// as it has a valid interface type.
@@ -4156,7 +4147,7 @@ void TypeChecker::validateDecl(ValueDecl *D) {
41564147

41574148
checkDeclAttributesEarly(DD);
41584149

4159-
validateGenericFuncSignature(DD);
4150+
validateGenericFuncOrSubscriptSignature(DD, DD, DD);
41604151

41614152
DD->setSignatureIsValidated();
41624153

@@ -4169,7 +4160,7 @@ void TypeChecker::validateDecl(ValueDecl *D) {
41694160

41704161
DeclValidationRAII IBV(SD);
41714162

4172-
validateGenericSubscriptSignature(SD);
4163+
validateGenericFuncOrSubscriptSignature(SD, SD, SD);
41734164

41744165
SD->setSignatureIsValidated();
41754166

0 commit comments

Comments
 (0)