Commit Graph

4289 Commits

Author SHA1 Message Date
Mohammed M. Ennabah
81ab8a302d changed diagnostics argument name to argument label SR-5857 (#11894)
* changed diagnostics argument name to argument label SR-5857
2017-09-13 19:07:19 -07:00
Pavel Yaskevich
0a178fd263 [ConstraintGraph] Disallow subtype constraint contractions
Presently subtype constraint is considered a candidate for contraction
via `shouldContractEdge` when left-hand side of the subtype constraint
is an inout type with type variable inside. Although it's intended to
be used only in combination with BindParam constraint assigned to the
same variable, that is actually never checked and contraction of subtype
constraint like that is invalid.

Resolves: rdar://problem/34333874
2017-09-11 15:13:13 -07:00
Pavel Yaskevich
fcd0069d8d [ConstraintSolver] NFC: Increase default shrinking termination threshold
We've found in practice that multiple different types of expressions
are still going to benefit from shrinking continuing even when it
couldn't simplify up to 10 sub-expressions.
2017-09-08 14:37:20 -07:00
swift-ci
94f314c5f5 Merge pull request #11816 from xedin/perf-rdar20859567-fix 2017-09-07 23:18:47 -07:00
Pavel Yaskevich
98bc9ab970 [TypeChecker] NFC: Adjust "too complex" error position of rdar://problem/20859567 perf test 2017-09-07 22:47:53 -07:00
swift-ci
b62810de14 Merge pull request #11802 from lancep/failingLinuxTest 2017-09-07 11:58:39 -07:00
swift-ci
781512b692 Merge pull request #11799 from graydon/sr-5836-swift-only-crashes-with-asserts 2017-09-07 11:26:05 -07:00
Lance Parker
2ae14bbf24 Disable failing test on Linux 2017-09-07 11:09:38 -07:00
Lance Parker
df29438fb2 Merge pull request #11775 from lancep/SetSetAlgebraTests
[stdlib] Add tests for all of the SetAlgebra methods on Set
2017-09-07 10:10:57 -07:00
Graydon Hoare
44b795dda5 Modify crasher for SR-5836 to require asserts 2017-09-07 10:04:36 -07:00
Lance Parker
a1801f6e76 Merge pull request #11782 from lancep/FailingTest
[stdlib] Disable test that's sometimes failing on Linux
2017-09-07 09:33:52 -07:00
Lance Parker
7a37e9ee1d radar in comment 2017-09-06 22:22:04 -07:00
Lance Parker
2ba35ca2b1 Added test that ensures Set conforms to SetAlgebra 2017-09-06 14:11:55 -07:00
Lance Parker
e06a66587f Use .skip instead of commenting out the test 2017-09-06 10:48:49 -07:00
Slava Pestov
3e2acb8ab0 Parse: Allow protocol compositions in all inheritance clauses
We allowed them for generic parameter inheritance clauses but
not anywhere else. While arguably this has stylistic benefits,
the restriction was not enforced consistently and was mostly a
result of implementation limitations.

Lift the restriction and fix things up where needed to make them
work. This brings us closer to allowing protocols to constrain
the 'Self' type to a subclass of a class by listing the class in
the protocol's inheritance clause, which was a feature from SE-0156,
but this doesn't quite work.

Fixes <https://bugs.swift.org/browse/SR-4678> and
<rdar://problem/31785092>.
2017-09-05 21:53:52 -07:00
Lance Parker
787268c412 Disable test that's sometimes failing on Linux 2017-09-05 16:55:36 -07:00
Mark Lacey
7464bbf605 Merge pull request #11773 from rudkx/test-for-sr5836
Add a test for a crasher that was reported.
2017-09-05 15:05:36 -07:00
Mark Lacey
84caa59e26 Merge pull request #11771 from rudkx/fix-test-for-rdar33433087
Switch test from 'not ...' to positive test with the correct verify c…
2017-09-05 14:25:00 -07:00
swift-ci
2195b73f07 Merge pull request #11772 from rudkx/test-for-rdar31529413 2017-09-05 14:04:22 -07:00
Lance Parker
5644468a50 Add tests for all of the SetAlgebra methods on Set 2017-09-05 13:14:58 -07:00
Mark Lacey
09846e0b68 Add a test for a crasher that was reported. 2017-09-05 12:42:52 -07:00
Mark Lacey
86e2bdab92 Add a test case for rdar://problem/31529413.
This crasher was fixed at some point but I don't know what change it
was.
2017-09-05 12:40:06 -07:00
Mark Lacey
f566d8d295 Switch test from 'not ...' to positive test with the correct verify check. 2017-09-05 12:38:17 -07:00
Maxim Moiseev
6c7d93491f Merge pull request #11627 from moiseev/swift-2-artifacts
[stdlib] Remove the Grand Renaming artifacts of Swift 3 era
2017-09-05 11:41:18 -07:00
Slava Pestov
50e7c066f7 Parse: Simpler handling of 'class' in protocol inheritance list
Instead of treating this as its own thing, just parse it as if
the user wrote 'AnyObject'.
2017-09-04 17:52:34 -05:00
Mark Lacey
890742a157 Merge pull request #11692 from rudkx/scale-test-updates
Scale test updates
2017-08-31 11:08:35 -07:00
swift-ci
92b13b809e Merge pull request #11664 from lancep/🐮Tests 2017-08-31 10:11:18 -07:00
Mark Lacey
6e7b7f5f18 Update type checker performance tests to use --invert-result.
Also tweak some of the test iteration bounds to ensure we have data
that better fits the models.

Ideally our counter would be a bit better so that those kinds of
tweaks wouldn't be necessary.
2017-08-31 00:25:51 -07:00
Lance Parker
c049b14bfa Removed useless parts of Array tests 2017-08-30 22:32:07 -06:00
Maxim Moiseev
3a0dd61bc0 Merge pull request #11683 from lancep/optionSetTests
[stdlib] Add OptionSet tests
2017-08-30 10:23:44 -07:00
Lance Parker
27bd01a32d Fix bad find and replace 2017-08-29 17:29:50 -07:00
Lance Parker
77b0f39cc2 Max's feedback 2017-08-29 17:23:11 -07:00
Jordan Rose
f5a6ac96cb [test] Add a test for the tricky circularity in SR-5191. (#11685)
This was fixed by 897effe, which I had originally thought would be a
no-functionality-change commit because it just made things lazier.
Turns out requirement signature deserialization can result in
circularity with sufficiently cross-referential conformances.

This isn't exactly a reduced test case because it still depends on
subclassing NSObject, which probably means there are hidden
dependencies on conforming to standard library protocols. But it's
better than nothing.

https://bugs.swift.org/browse/SR-5191
2017-08-29 16:51:51 -07:00
Lance Parker
b8713a35d3 Max's review feedback 2017-08-29 16:11:12 -07:00
Lance Parker
ba3cbf9549 Add OptionSet tests 2017-08-29 15:25:13 -07:00
Kuba (Brecka) Mracek
d03a575279 Unify the capitalization across all user-visible error messages (#11599)
* Unify the capitalization across all user-visible error messages (fatal errors, assertion failures, precondition failures) produced by the runtime, standard library and the compiler.

* Update some more tests to the new expectations.
2017-08-29 12:16:04 -07:00
Max Moiseev
4c0368a02a [test] Cleaning up tests 2017-08-29 10:04:39 -07:00
Mark Lacey
c63e279966 [Constraint system] Allow the solver to bind collection literal types earlier.
When this kicks in it can result in substantially speeding up type
inference for collection literals.
2017-08-29 00:39:19 -07:00
Mark Lacey
ced386aef3 Move a test that was a bit flaky into the slow tests.
This failed once locally because it was relatively close to 1s for type
checking time, so make it a bit more complex so that it is almost
certain to fail with the current compiler compiled with
release/no-asserts.
2017-08-28 23:58:15 -07:00
Lance Parker
19d43c24d1 Some more test cleanup 2017-08-28 22:49:19 -07:00
Lance Parker
3f60f1c80f Remove commented out code 2017-08-28 22:44:41 -07:00
Lance Parker
c623881c78 Fix Linux tests 2017-08-28 21:24:11 -07:00
Lance Parker
0ebb2fecca Add COW test for String 2017-08-28 17:20:19 -07:00
Lance Parker
3c8f5fa04a Add COW test for Array 2017-08-28 17:20:18 -07:00
swift-ci
85576fe364 Merge pull request #11617 from xedin/constraint-buckets 2017-08-28 16:16:18 -07:00
Pavel Yaskevich
8bf03b5c43 [ConstraintSolver] Add Component class as an isolated "solvable" unit
Move disjunction selection logic one level up from the `solveSimplified`
which allows to simplify its logic and avoid collecting disjunctions
multiple times for each solver step.

Sort constraint components/buckets based on how many disjunctions
they have, that helps to prune some of the branches with incorrect
solutions early which limits overall depth of the search.

Resolves: SR-4714
2017-08-28 13:39:29 -07:00
swift-ci
396ccd83b6 Merge pull request #11596 from graydon/nonlinear-regression-scale-test 2017-08-26 22:43:31 -07:00
Graydon Hoare
e90bf12e97 [scale-tests] Adjust for simplex optimizer, which likes more data. 2017-08-26 20:31:15 -07:00
swift-ci
f6c676e65f Merge pull request #11621 from lancep/disableSliceTest 2017-08-25 17:06:50 -07:00
Lance Parker
f42bd011cb Disable ArraySlice.append index test 2017-08-25 10:18:04 -07:00