[SR-8825] Metatype type joining not working in a member call on a IUO base #51333
Labels
access control
Feature → modifiers: Access control and access levels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.2
type checker
Area → compiler: Semantic analysis
Environment
Swift version 4.2-dev (LLVM c4295e5d5d, Clang afaa327551, Swift 2f557eb287)
Target: x86_64-apple-darwin17.7.0
Additional Detail from JIRA
md5: 141d5e262900e5aa3e7bc13cf6ed3f8f
Issue Description:
The following fails to compile in 4.2 (but it reportedly compiled in 4.1 – though I can't currently verify):
Making
x
either a non-optional or a strong optional using either optional chaining or a force unwrap to perform the member access allows the code to compile.In addition, doing the type join with instances rather than metatypes works:
The text was updated successfully, but these errors were encountered: