Xcode14.3からコンパイルでこのようなwarningが出るようになりました。
Heterogeneous collection literal could only be inferred to '[String : Any]'; add explicit type annotation if this is intentional
調べてみたところSwift5.8のバグのようで、Swift5.9(Xcode15-beta)で試したところこのwarningは出なくなりました。(Xcode14.3.1では変わらず)
https://forums.swift.org/t/swift-5-8-new-warnings-for-any-collections/63484/2
なので、このwarningは無視してXcode15がリリースされるまで待つでよさそうです。