want int64
rather than Optional(int64)
when dict.get(key, default_int64)
and dict value type is int64
#9473
Labels
Coming from gitter discussion (https://matrix.to/#/!gFwSEpcuaweltInwDW:gitter.im/$GQbCOdu6zbw3baQZM2CSSAm2xfw2bvWkgf3MImzOPlk?via=gitter.im&via=matrix.org&via=tryp.io), a test case:
The root cause is the @intrinsic
_dict_lookup
will forcily generateOptional
for the return value atA potential fix is that let
_dict_lookup
knows the default_value type, and choose usingOptional
or not based on that.I'm not sure if doing this violates Python semantics, I feel not?
The text was updated successfully, but these errors were encountered: