Commit e5b403b2 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ fix for incorrect union check in record of union, #31

parent 44c8efd1
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1228,8 +1228,10 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
			if (type instanceof ReferencedType) {
				originalType = findOriginalType(type)
			}
			
			if (originalType instanceof NestedUnionDef || originalType instanceof UnionDefNamed) {
			//TODO: nested as well?
			if (!(type instanceof RecordOfDefNamed || type instanceof SetOfDefNamed) && 
				(originalType instanceof NestedUnionDef || originalType instanceof UnionDefNamed)
			) {
				var guard = new Guard()
				var referencedFields = new ArrayList<FieldReference>()
				template.collectAssignedFieldSpecifications(referencedFields, true, guard)
@@ -1293,6 +1295,7 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
			//DONE: handle record of / set of? -> skip for now -> document
			if (originalType instanceof NestedUnionDef || originalType instanceof UnionDefNamed ||
				type instanceof RecordOfDefNamed || type instanceof SetOfDefNamed
				//TODO: also NestedRecordOf / NestedSetOf?
			) {
				
			} else {