Merge pull request #2871 from yebblies/issue8488

Issue 8848 - Array literals and AA literals are rejected as template value parameters
Fix associative arrays
Fix Issue 12094 - typeof(null) should convert to reference types