File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed 
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -typecheck -verify %s
2+ 
3+ protocol  A  { 
4+   associatedtype  BType :  B  where  BType. AType ==  Self 
5+   associatedtype  CType :  C  where  CType. AType ==  Self 
6+ 
7+   var  b :  BType  {  get  } 
8+   var  c :  CType  {  get  set  } 
9+ 
10+   func  bGetter( )  ->  BType 
11+   mutating  func  cSetter( _ newC:  CType ) 
12+ 
13+   subscript ( b:  BType )  ->  CType  {  get  set  } 
14+ } 
15+ 
16+ protocol  B  { 
17+   associatedtype  AType :  A 
18+ } 
19+ 
20+ protocol  C  { 
21+   associatedtype  AType :  A 
22+ } 
23+ 
24+ struct  AImpl :  A  { 
25+   typealias  BType  =  BImpl 
26+   typealias  CType  =  CImpl 
27+ 
28+   let  b :  BImpl 
29+   var  c :  CImpl 
30+ 
31+   func  bGetter( )  ->  BImpl  { 
32+     return  b
33+   } 
34+ 
35+   mutating  func  cSetter( _ newC:  CImpl )  { 
36+     c =  newC
37+   } 
38+ 
39+   subscript( b:  BImpl )  ->  CImpl  { 
40+     get  { 
41+       return  c
42+     } 
43+     set  { 
44+       c =  newValue
45+     } 
46+   } 
47+ } 
48+ 
49+ struct  BImpl :  B  { 
50+   typealias  AType  =  AImpl 
51+ } 
52+ 
53+ struct  CImpl :  C  { 
54+   typealias  AType  =  AImpl 
55+ } 
Original file line number Diff line number Diff line change 1+ // RUN: not %target-swift-frontend -typecheck %s
2+ 
3+ struct  Foo :  OptionSet  { 
4+   let  rawValue :  Int 
5+   static  let  none   =  Foo ( rawValue:  1  << 0 ) 
6+ } 
7+ 
8+ extension  Foo :  ExpressibleByIntegerLiteral  {  } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments