Take things literally

I heard takings things literally is a traits of ASD.

Is this a trait of ADHD or someone with ADHD and ASD traits, when a person interprets information literally ?