OK, I'm going mad here I think.
I'm putting together a minimal stdlib, partly for fun, partly for profit, who knows?
Anyway, my latest stumbling block is why my code for
public enum Optional<Wrapped> isn't being recognised. Looking through compiler source, the error generated (
error: broken standard library: cannot find Optional type) seems to be coming from calling
getOptionalDecl() and getting back a nil.
The thing is, I cannot find where this function exists! There are lots of calls to it (20 or so) throughout the swift source code but I can't find the function definition so I can't figure out why it's breaking.
Can anyone help? I feel like I'm going mad or missing something important!