Commit Graph

4274 Commits

Author SHA1 Message Date
Max Moiseev
1c75bd2433 Conditional conformances for LazyCollection
(cherry picked from commit 6e7b36a66c)
2017-12-11 10:46:40 -08:00
Max Moiseev
9e73d092ea Fix tests
(cherry picked from commit a1b1778c53)
2017-12-11 10:46:35 -08:00
Max Moiseev
1f78f3927b [stdlib] Conditional conformances for LazyMapCollection
(cherry picked from commit b927254564)
2017-12-11 10:46:30 -08:00
Max Moiseev
ea02806f28 [stdlib] Conditional conformances for LazyFilterCollection
(cherry picked from commit 833721a172)
2017-12-11 10:46:25 -08:00
swift-ci
9d0464c95c Merge pull request #13356 from atrick/cpf-bug 2017-12-10 16:40:28 -08:00
Andrew Trick
d2cc9d16e0 Un-XFAIL RangeReplaceable.swift.gyb test. 2017-12-10 14:58:50 -08:00
Graydon Hoare
62a6b74ad1 Revert "[stdlib] Conditional conformances for Lazy[Filter|Map]Collection" 2017-12-10 12:48:36 -08:00
Max Moiseev
6e7b36a66c Conditional conformances for LazyCollection 2017-12-08 12:53:24 -08:00
Max Moiseev
a1b1778c53 Fix tests 2017-12-08 12:53:24 -08:00
Max Moiseev
b927254564 [stdlib] Conditional conformances for LazyMapCollection 2017-12-08 12:52:12 -08:00
Max Moiseev
833721a172 [stdlib] Conditional conformances for LazyFilterCollection 2017-12-08 12:52:12 -08:00
Ben Cohen
4ddac3fbbd [stdlib] Eradicate IndexDistance associated type (#12641)
* Eradicate IndexDistance associated type, replacing with Int everywhere

* Consistently use Int for ExistentialCollection’s IndexDistance type.

* Fix test for IndexDistance removal

* Remove a handful of no-longer-needed explicit types

* Add compatibility shims for non-Int index distances

* Test compatibility shim

* Move IndexDistance typealias into the Collection protocol
2017-12-08 12:00:23 -08:00
swift-ci
2514f7061f Merge pull request #13330 from DougGregor/where-clause-ref-typealias-in-protocol 2017-12-07 15:38:53 -08:00
Jordan Rose
2bc0106810 [PrintAsObjC] Reintroduce +new when reintroducing -init. (#13320)
Follow-up to 49c65facc9 to account for subclasses. An unavailable
-init makes +new unavailable, but reintroducing it in a subclass
should reintroduce +new if the root class is NSObject (where +new is
implemented).

rdar://problem/35914080
2017-12-07 15:15:43 -08:00
Doug Gregor
25fc87ded0 Fix whitespace in a test 2017-12-06 16:35:59 -08:00
Doug Gregor
6eec137374 [Type checker] Don't check near-miss candidates of the wrong kind.
Fixes rdar://problem/35832679.
2017-12-06 14:01:47 -08:00
Ben Cohen
85d190cd7d [stdlib] Replace various uses of BlahSlice with Slice to reduce warnings (#13263)
* Kill the slice variants from the gybbed collection test types

* Handful more SDK instances

* Fix SequencesCollections.swift.gyb
2017-12-05 19:09:56 -08:00
Doug Gregor
e2f90cf781 Merge pull request #13250 from DougGregor/typealias-protocol-resolve-hack
[Type checker] Short-circuit uses of concrete typealiases in protocols.
2017-12-04 11:16:43 -08:00
Doug Gregor
04a9714d9b [Type checker] Short-circuit uses of concrete typealiases in protocols.
Hack to allow IndexDistance to become a deprecated typealias. The actual
fix here involves deeper surgery into the substitution machinery.
2017-12-04 10:05:48 -08:00
Arnold Schwaighofer
4739fab482 NSNumberBridging.swift stdlib tests also fail on armv7s
rdar://35814988
2017-12-04 08:06:26 -08:00
Karoy Lorentey
9fef06e59c Merge pull request #12752 from hamishknight/dictionary-subscript-addressor
[stdlib] Use addressor for Dictionary's subscript(_:default:)
2017-12-04 15:04:29 +01:00
Mark Lacey
66a11ce66b Revert "[ConstraintSystem] Use semantics providing exprs when dealing with favored types."
This reverts commit 2f80af15ec.

I expected this to have no effect, but it results in one of the
expression type checker tests taking longer, so that test was disabled.

This commit also re-enables the test since it now passes again.
2017-12-02 21:46:31 -08:00
Arnold Schwaighofer
2ca6e0372e InvalidStrideable.swift runs forever if compiled with Osize
rdar://35780657
2017-12-02 11:18:16 -08:00
Arnold Schwaighofer
2e99ddec69 Disable test that spuriously fails
SR-6520
2017-12-02 10:37:02 -08:00
Arnold Schwaighofer
8ebbf68e30 Disable test that breaks on armv7
rdar://35814988
2017-12-02 09:32:18 -08:00
Arnold Schwaighofer
d2842b17c0 Disable type_checker_perf fast test
Fails on bot.

SR-6518
2017-12-02 05:43:37 -08:00
Jordan Rose
ace0f56e9c Be way more conservative about marking dependencies as non-cascading (#13214)
Being part of the type of a private declaration isn't sufficient,
because that could be used for the inferred type of a non-private
variable/constant/property.

Also, introduce a new kind of dependency test that shows both that a
file A changes its interface based on a change in another file B, and
that the swiftdeps output for file A includes the dependency on file B
as cascading.

https://bugs.swift.org/browse/SR-6149
2017-12-01 18:35:18 -08:00
Greg Parker
da14cd79a6 [runtime] Clean up symbol exports in libc functions. (#13202) 2017-12-01 17:49:11 -08:00
Nate Cook
956e793ef0 Improve consistency in NSNumber bridging
This makes sure casts of NaN succeed, and init(exactly: NaN) fails.
2017-12-01 13:44:33 -06:00
Pavel Yaskevich
272fbb4609 [TypeChecker] NFC: Re-enable test-case for rdar://problem/18360240 in resilient builds
Resolves: rdar://problem/35779008
2017-11-30 17:48:47 -08:00
Mark Lacey
3cd9320e93 Merge pull request #13190 from rudkx/adjust-perf-tests
Increase the complexity of a couple type checker perf tests.
2017-11-30 17:17:02 -08:00
swift-ci
ceefc59a2d Merge pull request #13187 from xedin/rdar-35779008 2017-11-30 16:17:29 -08:00
Mark Lacey
c7e52922e4 Increase the complexity of a couple type checker perf tests.
Recent changes have made these tests borderline slow, which means they
no longer fail.

Let's make them really slow instead!

(...since they do not scale well, and we cut the actual testing time off at
1s in the solver, which means really slow isn't going to affect test
time much).
2017-11-30 16:00:32 -08:00
Pavel Yaskevich
164baacfa5 [TypeChecker] NFC: Increase polynomial threshold for rdar://18360240 test-case 2017-11-30 15:19:14 -08:00
Ben Cohen
dcab9493ae Removed some warnings (#12753) 2017-11-30 15:12:56 -08:00
Arnold Schwaighofer
a69c11978b Disable flaky type_checker_perf test on resilient bot
rdar://35779008
2017-11-30 12:37:11 -08:00
swift-ci
cefa6a5235 Merge pull request #13176 from aschwaighofer/xfail_resilient_stdlib_test 2017-11-30 09:13:28 -08:00
Ben Cohen
c4f0b5fe94 [stdlib] Adopt conditional conformance for Indices, Slice, ReversedCollection (#12913)
* Refactor Indices and Slice to use conditional conformance

* Replace ReversedRandomAccessCollection with a conditional extension

* Refactor some types into struct+extensions

* Revise Slice documentation

* Fix test cases for adoption of conditional conformances.

* [RangeReplaceableCollection] Eliminate unnecessary slicing subscript operator.

* Add -enable-experimental-conditional-conformances to test.

* Gruesome workaround for crasher in MutableSlice tests
2017-11-30 09:10:22 -08:00
Arnold Schwaighofer
a74e68fa39 Resilient stdlib: XFAIL RangeReplaceable.swift.gyb test
rdar://35646292
2017-11-30 08:21:26 -08:00
Pavel Yaskevich
49ca298f86 Merge pull request #13157 from xedin/fix-perf-test-rdar18360240
[TypeChecker] NFC: Increase exponential threshold for rdar://problem/18360240 test-case
2017-11-29 17:54:07 -08:00
Pavel Yaskevich
97cfcae4a0 [TypeChecker] NFC: Increase exponential threshold for rdar://problem/18360240 test-case 2017-11-29 15:26:02 -08:00
Kuba (Brecka) Mracek
3e87cf4bd1 Remove "%T" expansions (#11612) 2017-11-28 15:47:14 -08:00
swift-ci
36de380542 Merge pull request #13115 from xedin/rdar-35699666 2017-11-28 14:14:50 -08:00
Pavel Yaskevich
f5d9c2eb79 [Diagnostics] Fix crash related to diagnostics of trailing closures
While trying to diagnose a problem related to contextual result type
of the trailing closure, don't assume that declaration context is properly
set, instead directly set it to correct one before running type-check.

Resolves: rdar://problem/35699666
2017-11-28 13:12:25 -08:00
Nate Cook
04518afde3 [stdlib] Add conditional Hashable conformance for indices 2017-11-28 13:29:55 -06:00
Nate Cook
9dce40ca24 [stdlib] Add tests for index hashability 2017-11-28 13:29:55 -06:00
Ross Bayer
85abdcd62d Argparse "Overlay" Module (#12873)
* Implemented a wrapper module around the standard argparse package, exposing the same interface with some extras on top, including a new builder type with expressive DSL for constructing complex argument parsers.

* Fixed imports in build_swift/argparse/__init__.py to make flake8 happy.

* More re-formmating to meet the exacting standards of the python_lint script.

* Added doc-strings to all the modules in the build_swift argparse overlay.

* Implemented a new BoolType for the argparse module which handles boolean-like values and replaces the hard-coded boolean values in the _ToggleAction class.

* Fixed the mess of imports in the tests sub-package to favor relative imports, so now the unit-tests will actually run as expected. The README has also been updated with a better command for executing the unit-test suite.

* Updated the add_positional method on the ArgumentParser builder class to only take a single action or default to the store action.

* Cleaned up the set_defaults method.

* Added validation test to run the build_swift unit-tests.

* Updated validation-test for the build_swift unit-test suite to use %utils.

* Fixed hard-coded default values in the expected_options module used for generating argument parser tests.

* Updated the comment in the Python validation test to run the build_swift unit-tests.
2017-11-27 21:49:44 -08:00
swift-ci
d5b04e40b0 Merge pull request #13090 from aschwaighofer/disable_test_asan 2017-11-27 15:39:50 -08:00
swift-ci
36a08ec1bd Merge pull request #13087 from aschwaighofer/fix_stdlib_test_case_arraynew 2017-11-27 14:48:55 -08:00
Arnold Schwaighofer
66a2f5d05d Disable test that fails on linux asan bot
rdar://26498438
2017-11-27 14:35:06 -08:00