This is a simple example similar to the one in the manual. Doesn't seem to work for me. If someone verifies this is a bug, and not user error, I will file it.
type TMatrix[T, Rows, Columns] = object
f: T
proc `[]`(m: TMatrix, row, col: int): TMatrix.T = m.f
nimrod