There is currently a penalty for trying to use an assault or precision rifle with adjacent enemies, and precision rifles have a penalty if the target is too close. These penalties are probably not severe enough as is, and will likely be increased.
Units aren't strictly ranged or melee, and can choose the best weapon for the situation at hand. As such, this might be difficult to achieve without the defined roles. Distinguishing and balancing the combat disciplines is an area which will receive attention, so please share your thoughts on this!