File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
validation-test/compiler_crashers_fixed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -3723,6 +3723,13 @@ void TypeChecker::validateDecl(ValueDecl *D) {
3723
3723
return ;
3724
3724
}
3725
3725
3726
+ // Validating the parent may have triggered validation of this declaration,
3727
+ // so just return if that was the case.
3728
+ if (D->hasValidationStarted ()) {
3729
+ assert (D->hasValidSignature ());
3730
+ return ;
3731
+ }
3732
+
3726
3733
if (Context.Stats )
3727
3734
Context.Stats ->getFrontendCounters ().NumDeclsValidated ++;
3728
3735
Original file line number Diff line number Diff line change @@ -79,3 +79,13 @@ protocol SelfDotTest {
79
79
class Class { }
80
80
// expected-error@-1{{type 'Class' cannot be nested in protocol 'SelfDotTest'}}
81
81
}
82
+
83
+ struct Outer {
84
+ typealias E = NestedValidation . T
85
+ protocol NestedValidation { // expected-error {{protocol 'NestedValidation' cannot be nested inside another declaration}}
86
+ typealias T = A . B
87
+ class A { // expected-error {{type 'A' cannot be nested in protocol 'NestedValidation'}}
88
+ typealias B = Int
89
+ }
90
+ }
91
+ }
Original file line number Diff line number Diff line change 5
5
// See https://swift.org/LICENSE.txt for license information
6
6
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7
7
8
- // REQUIRES: asserts
9
- // RUN: not --crash %target-swift-frontend %s -emit-ir
8
+
9
+ // RUN: not %target-swift-frontend %s -emit-ir
10
10
{ typealias e: P. a
11
11
protocol P{ typealias a = a . b : class a
You can’t perform that action at this time.
0 commit comments