File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3412,7 +3412,8 @@ bool MissingMemberFailure::diagnoseForDefaultAnyArrayLiteral() const {
3412
3412
if (contextualType)
3413
3413
return false ;
3414
3414
3415
- if (isa<UnresolvedMemberExpr>(expr) && isa<ArrayExpr>(parentExpr)) {
3415
+ if (isa<UnresolvedMemberExpr>(expr) &&
3416
+ parentExpr && isa<ArrayExpr>(parentExpr)) {
3416
3417
if (auto *metatype = baseType->getAs <MetatypeType>()) {
3417
3418
baseType = metatype->getInstanceType ();
3418
3419
}
Original file line number Diff line number Diff line change @@ -664,3 +664,7 @@ func test_34770265(_ dict: [Int: Int]) {
664
664
dict. rdar_34770265_val ( )
665
665
// expected-error@-1 {{referencing instance method 'rdar_34770265_val()' on 'Dictionary' requires the types 'Int' and 'String' be equivalent}}
666
666
}
667
+
668
+ // SR-12672
669
+ _ = [ . e] // expected-error {{reference to member 'e' cannot be resolved without a contextual type}}
670
+ let _ : [ Any ] = [ . e] // expected-error {{type 'Any' has no member 'e'}}
You can’t perform that action at this time.
0 commit comments