Fixing local inference to use the supertype of constants