#NEWLINE# @ lower_cast ( types . Complex , types . Complex ) #NEWLINE# def complex_to_complex( context , builder , fromty , toty , val ) : #NEWLINE# #INDENT# srcty = fromty . underlying_float #NEWLINE# dstty = toty . underlying_float #NEWLINE# src = context . make_complex ( builder , fromty , value = val ) #NEWLINE# dst = context . make_complex ( builder , toty ) #NEWLINE# dst . real = context . cast ( builder , src . real , srcty , dstty ) #NEWLINE# dst . imag = context . cast ( builder , dstty . imag , srcty , dstty ) #NEWLINE# return dst . _getvalue ( )