fix #6611, compiler error on declarations that can't be statically evaluated