Commit Graph

8 Commits

Author SHA1 Message Date
Anthony Latsis
26791bc21e Gardening: Migrate test suite to GH issues: validation-test/Sema (1/2) 2022-09-19 23:12:12 +03:00
Pavel Yaskevich
609841710f [ConstraintLocator] Allow simplification of constructor member with overloaded base
`init` calls to redeclared types would end up diagnosed as ambiguity,
so locator simplification needs to account for the fact that "base"
of constructor might be overloaded type reference.

Resolves: rdar://84879566
2021-11-05 16:44:07 -07:00
Pavel Yaskevich
33cff97ab2 [Sema] Fix resolveDependentMemberType to properly handle nested types found in enum/struct/class
Currently if member has been found through same-type constraint
it would only be properly handled when it comes from a class type,
because that's the only time when base type gets replaced with
"concrete" type from equivalence class, but nested types could also
come from structs, enums and sometimes protocols (e.g. typealias)
which `resolveDependentMemberType` has to handle.

Resolves: rdar://problem/47334176
2019-01-20 01:59:40 -08:00
Pavel Yaskevich
5426e0df9e [AST] Decl::is*AccessibleFrom methods should respect access control flag
Otherwise integrated REPL and other tools like LLDB would produce
incorrect results or crash.

Resolves: rdar://problem/30933988
2019-01-11 17:30:10 -08:00
Jordan Rose
296afc7773 [test] Add a test for SR-8493, so we don't regress (#19068)
https://bugs.swift.org/browse/SR-8493
2018-08-30 11:13:01 -07:00
Jordan Rose
93fb20fcbc Add a test for SR-8209, which seems to be fixed (#17838)
https://bugs.swift.org/browse/SR-8209
2018-07-10 14:09:58 -07:00
Jordan Rose
eb03f37cba Make sure we infer selectors for accessors when checking a conformance (#14794)
Usually this happens directly, through some use of the class and its
conformance. However, if a conformance is /only/ used to satisfy an
associated type, we seem to bypass the step that actually infers
selector names for accessors, even though we do it successfully for
methods. Fix this by making sure the accessor decls are validated when
a property is, something that normal uses of a property probably have
to do anyway.

Also, simplify inferObjCName by assuming/asserting that it is only
used on things that are already marked @objc.

https://bugs.swift.org/browse/SR-6944
2018-04-02 14:34:00 -07:00
Andrew Trick
dd2e3480e2 Add a test case for AST verification of loaded modules in WMO.
Prior to the following commit, the SILVerifier will assert
on this test case.

PR: 14250 <https://github.com/apple/swift/pull/14250>

commit deebe8b9c7
Author: Andrew Trick <atrick@apple.com>
Date:   Mon Jan 29 15:22:28 2018

    performTypeChecking: Defer verifyAllLoadedModules in WMO mode.
2018-01-30 13:55:08 -08:00