parent
							
								
									43931be451
								
							
						
					
					
						commit
						3c7c11e55b
					
				| 
						 | 
					@ -6038,6 +6038,12 @@ fn (mut g Gen) write_types(types []ast.TypeSymbol) {
 | 
				
			||||||
		if typ.name.starts_with('C.') {
 | 
							if typ.name.starts_with('C.') {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							if typ.kind == .none_ {
 | 
				
			||||||
 | 
								g.type_definitions.writeln('struct none {')
 | 
				
			||||||
 | 
								g.type_definitions.writeln('\tEMPTY_STRUCT_DECLARATION;')
 | 
				
			||||||
 | 
								g.type_definitions.writeln('};')
 | 
				
			||||||
 | 
								g.typedefs2.writeln('typedef struct none none;')
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		// sym := g.table.get_type_symbol(typ)
 | 
							// sym := g.table.get_type_symbol(typ)
 | 
				
			||||||
		mut name := typ.cname
 | 
							mut name := typ.cname
 | 
				
			||||||
		match mut typ.info {
 | 
							match mut typ.info {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					type MapValue = int | none
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					fn test_sum_type_with_none_type() {
 | 
				
			||||||
 | 
						assert true
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue