swift
c56ea461 - [Sema] Add fix-it to import RegexBuilder

Commit
3 years ago
[Sema] Add fix-it to import RegexBuilder For code such as the following: ``` let r = Regex { /abc/ } ``` If RegexBuilder has not been imported, emit a specialized diagnostic and fix-it to add `import RegexBuilder` to the file. Unfortunately we're currently prevented from emitting the specialized diagnostic in cases where the builder contains references to RegexBuilder types, such as: ``` let r = Regex { Capture { /abc/ } } ``` This is due to the fact that we bail from CSGen due to the reference to `Capture` being turned into an `ErrorExpr`. We ought to be able to handle solving in the presence of such errors, but for now I'm leaving it as future work. rdar://93176036
Author
Parents
Loading