Tests for nullary type classes (#7642)