Scala : Trust boundary violation