Commit Graph

7 Commits

Author SHA1 Message Date
Slava Pestov
65b317fa36 Sema: Fix infinite recursion when checking if class with circular inheritance has failable initializer
Fixes <rdar://problem/19919421>.

Swift SVN r30677
2015-07-27 00:40:45 +00:00
Slava Pestov
74c2cb7820 Sema: more robust diagnostic for circular inheritance
The code would generate different diagnosics depending on
the cycle having length 1 or longer. The length 1 case
was broken if the path had a prefix that wasn't part
of the cycle, eg if we have C : A, A : A and visit C
first.

Swift SVN r28317
2015-05-08 17:14:57 +00:00
Doug Gregor
480b6e9af4 Start using DeclContext::getLocalConformances() to decide which conformances get recorded.
Swift SVN r26320
2015-03-19 22:10:04 +00:00
Doug Gregor
940ba832e5 Use the conformance lookup table to find protocol conformances.
Replace the loop over all known protocols with a query into the
actual conformance lookup table, which more properly deals with
out-of-order conformance queries, inheritance of protocol
conformances, and conformance queries in multi-file situtations.

The SILGen test change is because we're no longer emitting redundant
conformances, while the slight diagnostic regression in
circular-inheritance cases is because we handle circular inheritance
very poorly throughout the compiler.

While not the end, this is a major step toward finishing
rdar://problem/18448811.

Swift SVN r26299
2015-03-19 06:35:28 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Joe Pamer
8502a7e203 The type checker was able to diagnose indirectly recursive inheritance cycles, but the simple direct case would result in a compiler crash. (rdar://problem/16712071)
Swift SVN r21816
2014-09-09 23:58:57 +00:00
Doug Gregor
6c80f64c6e Diagnostic circular class inheritance.
Break cycles agressively when we find circular class inheritance. The
stronger AST invariants prevent us from having to check for loops
everywhere in the front end.


Swift SVN r7325
2013-08-19 15:31:13 +00:00