Add code snippet and tests for non-explicit type