Test interaction of record matching and type patterns