@@ -302,12 +302,6 @@ function isTypeAssignableInternal(from: PropertyType | undefined, to: PropertyTy
302302 result = from . types . every ( fromType => isTypeAssignableInternal ( fromType , to , visited ) ) ;
303303 } else if ( isPropertyUnion ( to ) ) {
304304 result = to . types . some ( toType => isTypeAssignableInternal ( from , toType , visited ) ) ;
305- } else if ( isValueType ( to ) && isUnionType ( to . value ) ) {
306- if ( isValueType ( from ) && isUnionType ( from . value ) && to . value . name === from . value . name ) {
307- result = true ;
308- } else {
309- result = isTypeAssignableInternal ( from , to . value . type , visited ) ;
310- }
311305 } else if ( isReferenceType ( from ) ) {
312306 result = isReferenceType ( to )
313307 && from . isMulti === to . isMulti
@@ -336,6 +330,12 @@ function isTypeAssignableInternal(from: PropertyType | undefined, to: PropertyTy
336330 } else {
337331 result = isInterfaceAssignable ( from . value , to . value , new Set ( ) ) ;
338332 }
333+ } else if ( isValueType ( to ) && isUnionType ( to . value ) ) {
334+ if ( isValueType ( from ) && isUnionType ( from . value ) && to . value . name === from . value . name ) {
335+ result = true ;
336+ } else {
337+ result = isTypeAssignableInternal ( from , to . value . type , visited ) ;
338+ }
339339 } else if ( isPrimitiveType ( from ) ) {
340340 result = isPrimitiveType ( to ) && from . primitive === to . primitive ;
341341 } else if ( isStringType ( from ) ) {
0 commit comments