Commits

gregomni committed 9211c7c0d48
Better diagnose error coming from unwrapping optional before initialized. Added a check for whether the escape use is due to an UncheckedTakeEnumDataAddrInst, which accesses the memory to grab the .Some part of an Optional during “?.” or “!”. In that case, use the generic used-before-initialized diagnostic, since it isn’t actually because of closure capture. Added test cases, including specifically testing that capturing in a closure in order to unwrap the optional is still ok.