Files
swift-mirror/test/NameLookup/subscript-generic-conjuction-astscope.swift
Hamish Knight 5b99c2020f NFC: Re-organize NameBinding tests
The directory currently seems to have a mix of
tests for import resolution and name lookup.
Therefore split it into two directories;
ImportResolution and NameLookup.
2020-03-29 18:51:09 -07:00

15 lines
433 B
Swift

// Check that ASTScope lookup works for a construction found in GRDB's Row.swift
// RUN: %target-swift-frontend -typecheck %s -enable-astscope-lookup -warn-if-astscope-lookup 2>%t.out
// RUN: %FileCheck %s <%t.out
// CHECK: WARNING: TRYING Scope exclusively
protocol P1 {}
protocol P2 {}
struct S<Value> {
// Next line is the problematic one, finding P2
subscript<Value: P1 & P2>(_ index: Int) -> Value? {
return nil
}
}