fix mistake in constant

* constant returns a function rather than a type
Merge pull request #3291 from dmorgantini/master

fix mistake in constant