  We prove an Assmus-Mattson-type theorem for block codes where the alphabet is
the vertex set of a commutative association scheme (say, with $s$ classes).
This in particular generalizes the Assmus-Mattson-type theorems for
$\mathbb{Z}_4$-linear codes due to Tanabe (2003) and Shin, Kumar, and Helleseth
(2004), as well as the original theorem by Assmus and Mattson (1969). The
weights of a code are $s$-tuples of non-negative integers in this case, and the
conditions in our theorem for obtaining $t$-designs from the code involve
concepts from polynomial interpolation in $s$ variables. The Terwilliger
algebra is the main tool to establish our results.
