Slava Pestov
88cbcea325
Add a regression test for SR-8469 / rdar://43888895
2019-11-07 22:59:07 -05:00
Alexis Laferrière
fd191bff43
Fix test rdar56710317.swift for the iOS simulator
...
Fix rdar://problem/56999504
2019-11-07 15:19:46 -08:00
Suyash Srijan
a2d0bf6f9c
[PropertyWrappers] When finding the initial value for the property, properly handle the situation where we have multiple attached property wrappers
...
If a property has multiple property wrappers attached, we'll have multiple nested calls, where each call's argument is a call to construct the next wrapper in the chain. However, when we use multiple wrappers consecutively, we cannot just rely on the call's type matching the innermost wrapper's type, because it will match the first wrapper in the sequence of consective wrappers and we'll end up crashing in SILGen. So, we should check if the call's argument is another call and look into that before checking the types.
2019-11-07 21:27:52 +00:00
swift-ci
b51d363969
Merge pull request #28130 from DougGregor/diag-rdar56710317
2019-11-07 11:05:07 -08:00
Doug Gregor
f4c45e8057
[Type check diagnostics] Add already-fixed test case from rdar://problem/56710317.
...
Ensures that we don't regress diagnostics for this case in the future.
2019-11-07 09:41:36 -08:00
Holly Borla
2394bab1fb
Merge pull request #28116 from hborla/same-type-regression
...
[ConstraintSystem] Allow binding metatypes to succeed if one contains a hole
2019-11-06 16:22:39 -08:00
Holly Borla
b560261838
[ConstraintSystem] Allow binding metatypes to succeed if one contains
...
a hole.
2019-11-06 14:02:36 -08:00
Robert Widmann
c75af38a7a
Drop ConformanceContexts out of the TypeChecker
2019-11-06 11:41:03 -08:00
Ben Langmuir
67592dbc1c
Update diagnostic after CS change
...
rdar://56942731
2019-11-06 08:50:09 -08:00
Luciano Almeida
1184492d25
[Diagnostics] SR-11419 Diagnose protocol stub note in editor mode only ( #28101 )
...
* [TypeChecker] Enclosing stubs protocol note within editor mode
* [test] Removing note from test where there is no -diagnostics-editor-mode flag
* Formatting modified code
* [tests] Fixing tests under validation-tests
2019-11-06 07:42:48 -08:00
Holly Borla
e63f259f4f
[ConstraintSystem] Bind holes to UnresolvedType instead of Any.
2019-11-05 09:15:13 -08:00
Holly Borla
561e527848
[ConstraintSystem] Extend the ExplicitlySpecifyGenericArguments fix to cover
...
all cases of missing generic parameters.
In `ComponentStep::take` when there are no bindings or disjunctions, use hole
propagation to default remaining free type variables that aren't for generic
parameters and continue solving. Rather than using a defaultable constraint for
holes, assign a fixed type directly when we have no bindings to try.
2019-11-05 09:15:13 -08:00
David Zarzycki
cc8acdce93
[Tests] Fix REQUIRES for two tests
...
The non-gyb type checker performance tests tend to require non-assert
and release builds. This makes two tests consistent with the others.
This also fixes sr139.swift, which was needlessly running the type checker twice.
2019-11-05 11:15:25 +02:00
Suyash Srijan
d1e61a3000
[Test] Add test case for SR-11600 to compiler_crashers_2_fixed
2019-11-04 23:55:39 +00:00
Suyash Srijan
573aceeba3
[ConstraintSystem] Don't create a AllowArgumentMismatch fix when there is an argument type mismatch in synthesized wrappedValue init
...
This is because we already emit a diagostic to tell the user that the property's type does not match the wrappedValue type, so this diagnostic can be a bit confusing especially because the initializer is synthesized
2019-11-04 22:29:13 +00:00
Suyash Srijan
a5935d1ff7
[PropertyWrappers] Mark the property as invalid when it's type fails to match the type of the wrappedValue property
...
Otherwise, we will end up producing wrong diagnostics as well as crashing later on in certain cases
2019-11-04 22:29:13 +00:00
Slava Pestov
547fdaa3b8
Merge pull request #28026 from slavapestov/orts
...
Small cleanup to aid debugging and some regression tests
2019-11-02 09:00:44 -04:00
Andrew Trick
fd6497bbc7
SILCombine cleanup; replace null check with dyn_cast_or_null.
...
Remove 'not' and add '-emit-sil' to the corresponding lit test's run line.
2019-11-01 21:36:35 -07:00
Andrew Trick
4e106fb2e4
Merge pull request #28012 from zoecarver/fix/optimizer-and-SR-11624
...
Fix crash when optimizing protocol composition
2019-11-01 19:52:42 -07:00
Slava Pestov
07f8f551ed
Add a regression test for SR-8968
...
Also rdar://problem/45217645.
2019-11-01 18:55:16 -04:00
Slava Pestov
116c5bfd5b
Add a regression test for rdar://problem/56700017
2019-11-01 18:55:16 -04:00
zoecarver
ddade0a33d
Add validation test under compiler crashers fixed
2019-11-01 10:29:34 -07:00
Robert Widmann
0af343469b
Pre-Request Cleanup For Implicit Constructors
...
Push through an easy refactoring to the way we validate and install
implicit constructors. This patch would be NFC but for a regression
test that now must diagnose. #26159 changed validation order in such
a way that the code in validation-test-macosx-x86_64/compiler_crashers_2_fixed/0124-sr5825.swift
used to be accepted. This patch once again changes validation order, so
we now reject this code, restoring the behavior seen on all prior
versions of Swift.
On its face, this test should work. In order for it to do so, witness
matching has to be smarter about the declarations it asks for their
interface type, or it will risk these circular constructions
accidentally being accepted or rejected on a whim.
2019-10-31 13:13:08 -07:00
David Zarzycki
4097282ae2
Disable build system test that assumes standalone build
2019-10-30 07:36:22 +02:00
Robert Widmann
e95cc4981b
Revert "Remove Some Users of -solver-enable-operator-designated-types"
...
This reverts commit 46ae4757d2 .
2019-10-29 10:33:16 -07:00
Robert Widmann
28b66f6225
Switch DeclValidation Counter to Request Counter
...
Now that validateDecl is gone, stop duplicating work here and use the
request counter instead.
2019-10-28 15:36:50 -07:00
swift-ci
3971c0a973
Merge pull request #27890 from vedantk/master
2019-10-28 13:51:52 -07:00
Vedant Kumar
157cb2a654
[build-script] Forward --skip-local-build to build-script-impl
...
Otherwise, build-script-impl ignores --skip-local-build.
2019-10-28 12:20:38 -07:00
Robert Widmann
30fd3f0a07
Merge pull request #27872 from CodaFi/a-designation-without-a-difference
...
[NFC] Remove Some Users of -solver-enable-operator-designated-types
2019-10-25 18:51:04 -07:00
Robert Widmann
bbed5276ee
Merge pull request #27862 from CodaFi/valid-the-impalers-revenge
...
Remove The Last Vestiges of `isInvalid` from Parse Harder This Time
2019-10-25 17:38:01 -07:00
Robert Widmann
86e5ed18a0
Add a bailout path to protocol requirement source formation
...
The GSB will try to form and note invalid constraints, but there are
a few paths that aren't prepared for error types to pop up. Add
a defensive check to formProtocolRelativeType to make sure we don't wind
up force-casting an error type.
Fixes rdar://56116278
2019-10-25 13:08:41 -07:00
Xi Ge
96523124a9
[test] xfail several stdlib tests failing in CI
...
10:21:57 Failing Tests (4):
10:21:57 Swift(macosx-x86_64) :: stdlib/SwiftNativeNSBase.swift
10:21:57 Swift(macosx-x86_64) :: stdlib/TestNSString.swift
10:21:57 Swift(macosx-x86_64) :: stdlib/TestJSONEncoder.swift
rdar://55727144
2019-10-25 11:04:52 -07:00
Robert Widmann
46ae4757d2
Remove Some Users of -solver-enable-operator-designated-types
...
There are now two regression tests that need this feature enabled to
pass.
2019-10-24 16:50:45 -07:00
Robert Widmann
a1e956d3e7
Resolve a compiler crasher
2019-10-24 16:03:41 -07:00
David Smith
637af2f9fe
Merge pull request #27709 from Catfish-Man/bridge-to-the-future
...
Optimize accessing Swift arrays via ObjC
2019-10-23 00:19:06 -07:00
David Smith
d9cef0afef
Optimize accessing Swift Arrays from ObjC
2019-10-22 20:57:36 -07:00
Suyash Srijan
76a5896c3f
Merge pull request #27727 from theblixguy/fix/SR-11603
...
[PropertyWrappers] Fix lvalue computation in buildStorageReference
2019-10-19 13:28:36 +01:00
Suyash Srijan
d311879122
[Test] Move test case to compiler crashers
2019-10-19 03:34:09 +01:00
Holly Borla
e5c99cace6
Merge pull request #27769 from hborla/anyobject-conformance-failure
...
[ConstraintSystem] Diagnose missing AnyObject conformance using the MissingConformance constraint fix.
2019-10-18 22:10:21 -04:00
Holly Borla
dca1373e46
[ConstraintSystem] Don't fail in matchTypes when two primary archetype types
...
are not equal when part of a type requirement. This allows the
SkipSameTypeRequirement constraint fix to be applied instead.
2019-10-18 17:34:03 -07:00
Rintaro Ishizaki
bb0b8f72a5
Merge pull request #27741 from rintaro/xfail-55944126
...
Disable ArrayNew.swift.gyb in armv7k or armv7s
2019-10-17 15:19:53 +02:00
Rintaro Ishizaki
836b929bd0
Disable ArrayNew.swift.gyb in armv7k or armv7s
...
rdar://problem/55944126
2019-10-16 17:13:36 -07:00
Jordan Rose
056979680d
Revert "[reflection] Fix tests with bitwise_takable output"
...
This reverts commit b906348665 .
2019-10-16 16:09:56 -07:00
Jordan Rose
52035c1cb9
Merge pull request #27081 from ismetanin/SR-7165
...
SR-7165. Excise <iostream> from reflection
2019-10-16 13:34:02 -07:00
Ivan Smetanin
b906348665
[reflection] Fix tests with bitwise_takable output
2019-10-16 09:03:55 +03:00
Brent Royal-Gordon
ecf76c8fdf
Merge pull request #27586 from brentdax/everything-evil
...
Fix keypath-as-function crasher
2019-10-15 17:54:13 -07:00
Rintaro Ishizaki
cb00b8faf9
Revert "Merge pull request #27120 from rintaro/parser-rdar55267292"
...
This reverts commit e1b51f32aa , reversing
changes made to 086eb07ede .
2019-10-14 13:39:48 -07:00
Brent Royal-Gordon
ca25640cc3
Merge branch 'master' into everything-evil
2019-10-14 13:24:03 -07:00
Rintaro Ishizaki
4eadbaa9f6
Revert "Merge pull request #27466 from rintaro/syntaxparse-type"
...
This reverts commit a4fcd26b38 , reversing
changes made to 88ecae4b9a .
2019-10-14 12:19:04 -07:00
swift-ci
7b9f30b517
Merge pull request #27643 from DougGregor/rdar45590743-test
2019-10-11 22:20:58 -07:00