Commit Graph

7754 Commits

Author SHA1 Message Date
Nate Chandler
06971042e5 [Test] Disabled a couple tests on arm64e.
rdar://85526879
rdar://85526916
2021-12-03 08:32:40 -08:00
Erik Eckstein
1eca11dc28 tests: disable StringMemoryTest.swift, which fails with ASAN
rdar://85913190
2021-12-03 14:56:22 +01:00
Alejandro Alonso
2ab99418e2 Disable another a test (#40376) 2021-12-02 20:34:52 -08:00
Doug Gregor
fc3a124216 Merge pull request #40354 from DougGregor/clang-importer-stored-properties-crash
[Clang importer] Don't insert members found via lookup into the wrong context
2021-12-01 12:43:24 -08:00
Doug Gregor
4fccfccadf [Clang importer] Don't insert members found via lookup into the wrong context.
Discovered while investigating rdar://85840928.
2021-12-01 09:57:32 -08:00
Alex Hoppen
290df69412 Merge pull request #40344 from apple/more-backdeployment-trouble
[test] Fix back deployment for tests looking at exclusivity checking
2021-12-01 10:40:54 +01:00
Alejandro Alonso
7db88b2257 Disable some failing tests (#40338)
change to requires
2021-11-30 19:03:44 -08:00
Karoy Lorentey
83fee79056 [test] rdar://85620934 Fix back deployment vs exclusivity checking tests 2021-11-30 17:29:10 -08:00
Pavel Yaskevich
9649e74490 Merge pull request #40335 from xedin/atmpt-3-fix-flaky-test
[TypeChecker] NFC: Scope down per test-case for rdar://74035425
2021-11-30 15:47:15 -08:00
Kuba (Brecka) Mracek
34b45cbcc2 Add a crash reproducer for rdar://85843677 (#40327) 2021-11-30 13:50:49 -08:00
buttaface
1cfb8f024e [android] Do not pick a linker when testing anymore, as the NDK only uses lld now (#40303) 2021-11-30 10:52:46 -08:00
Pavel Yaskevich
053c874047 [TypeChecker] NFC: Scope down per test-case for rdar://74035425
Remove some literals from the test-case to prevent it from randomly
failing in some CI configurations.

Resolves: rdar://85267603
2021-11-30 10:29:57 -08:00
Pavel Yaskevich
bc54bc6bb7 Revert "[TypeChecker] SE-0326: Enable multi-statement closure inference by default" 2021-11-29 17:26:08 -08:00
Anthony Latsis
9fc633e0b8 Merge pull request #39652 from AnthonyLatsis/no-context
TypeResolution: Abolish TypeResolutionStage::Contextual
2021-11-29 16:44:27 +03:00
Richard Wei
65bffd7ad7 Add _MatchingEngine and _StringProcessing modules.
These modules are part of the experimental declarative string processing feature. If accepted to the Standard Library, _StringProcessing will be available via implicit import just like _Concurrency, though _MatchingEngine will still be hidden as an implementation detail.

`_MatchingEngine` will contain the general-purpose pattern matching engine ISA, bytecode, and executor. `_StringProcessing` will contain regular expression and pattern matching APIs whose implementation depends on the matching engine..

Also consolidates frontend flag `-enable-experimental-regex` as `-enable-experimental-string-processing`.

Resolves rdar://85478647.
2021-11-19 09:27:33 -08:00
Anthony Latsis
588603f795 Sema: Pass the correct substitutions to 'checkGenericArguments' instead of mapping into context in place 2021-11-19 16:39:37 +03:00
buttaface
30c292ca87 [android] Update to NDK 23b (#39921)
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.
2021-11-17 20:58:42 -08:00
Pavel Yaskevich
63f355fde0 Merge pull request #39989 from xedin/more-diag-improvements-for-multi-stmt-closures
[TypeChecker] SE-0326: Enable multi-statement closure inference by default
2021-11-17 10:14:58 -08:00
Pavel Yaskevich
14939cf467 [CSGen] Rework nil-coalescing operator handling in LinkedExprAnalyzer
Allow `LinkedExprAnalyzer` to capture `??` operator and walk into
its arguments because they could have valuable type information,
but don't attempt to favor or link operators if `??` is present in a chain.

Resolves: rdar://85277993
2021-11-16 18:00:11 -08:00
Pavel Yaskevich
67d87e104f [Tests] NFC: Adjust all the test-cases improved by multi-statement inference 2021-11-15 16:42:06 -08:00
Karoy Lorentey
a2c9bc6470 Merge pull request #40146 from lorentey/label-validation-tests
[lit] Apply a different label for tests under validation-test/ than the ones under test/
2021-11-12 16:56:45 -08:00
Karoy Lorentey
f2132728b7 Merge pull request #40125 from apple/Set-test-cleanup
[test] Remove duplicate symmetricDifference tests
2021-11-11 19:42:35 -08:00
Karoy Lorentey
41c452804c Merge pull request #40134 from lorentey/fix-excl-tests-with-backdeployed-runtime
[test] Fix expected error message with backdeployed runtimes
2021-11-11 19:42:20 -08:00
Karoy Lorentey
8c3a8e798e [lit] Apply a different label for tests under validation-test/ than the ones under test/
This will let us find the test file that produced a failure on the first attempt, saving the project at least three trillion cumulative person-seconds each year.
2021-11-11 17:07:27 -08:00
Karoy Lorentey
bb36a87205 Update hasBackdeployedConcurrencyRuntime logic 2021-11-11 13:44:41 -08:00
Pavel Yaskevich
6fc646ac4a Merge pull request #40131 from xedin/rdar-85267603
[TypeChecker] NFC: Allow perf test-case for rdar://74035425 to run on…
2021-11-11 09:49:39 -08:00
Guillaume Lessard
8cc076000a Merge pull request #40116 from glessard/concurrency-assertions
[stdlib] replace uses of assert in the Concurrency module
2021-11-11 09:50:20 -07:00
Karoy Lorentey
4c28e823ef [test] Fix expected error message with backdeployed runtimes 2021-11-10 18:27:04 -08:00
Pavel Yaskevich
5422bb884c [TypeChecker] NFC: Allow perf test-case for rdar://74035425 to run only on macOS
Resolves: rdar://85267603
2021-11-10 14:59:11 -08:00
Guillaume Lessard
71f2d8e12d [test] disambiguate _internalInvariant
This test disables access controls, and it mistakenly used the Concurrency module's version of `_internalInvarant` instead of the Standard Library's version.
2021-11-10 11:59:04 -07:00
Karoy Lorentey
16d7525713 [test] Remove duplicate symmetricDifference tests 2021-11-09 21:39:03 -08:00
Alex Hoppen
60c78afb13 Merge pull request #40065 from ahoppen/pr/lexing-cutoff
[Parser] Don't modify the current token kind when cutting off parsing
2021-11-09 18:33:19 +01:00
Alex Hoppen
b888dc0e40 [Parser] Don't modify the current token kind when cutting off parsing
Previously, when we reached the maximum nesting level, we changed the current token’s kind to an EOF token. A lot of places in the parser are not set up to expect this token change. The intended workaround was to check whether pushing a structure marker failed (which would change the token kind) and bail out parsing if this happened. This was fragile and caused assertion failures in assert builds.

Instead of changing the current token’s kind, and failing to push the structure marker, let the lexer know that it should cut off lexing, essentially making the input buffer stop at the current position. The parser will continue to consume its current token (`Parser.Tok`) and the next token that’s already lexed in the lexer (`Lexer.NextToken`) before reaching the emulated EOF token. Thus two more tokens are parsed than before, but that shouldn’t make much of a difference.
2021-11-09 12:28:10 +01:00
Holly Borla
b3ad77f21c [Test] Add a few more + operands to a type checker perf test to exhibit
exponential behavior.

Binding value types early allows the previous version of this test
to compile, but the performance still doesn't scale with a few more
operands in the + chain.
2021-11-08 13:51:23 -08:00
Pavel Yaskevich
4799acfb20 [CSBindings] Attempt a type variable early if it's constrained by a struct/enum type
If a type variable has a subtype binding which came from a conversion/subtype/equality
constraint to a struct or enum (expect to `AnyHashable`, `Unsafe{Mutable}RawPointer`),
attempt it early because that type is the only choice which is not going to fail such
constraint.

For example, in cases like `$T argument convertible to Int` type variable could
only be bound to `Int`, `Int!`, or `@lvalue Int` to satisfy that constraint, so
it would make sense to attempt to bind it to `Int` early if it doesn't represent
a result of a member lookup (that's how IUO and/or `@lvalue` could be inferred)`
and doesn't have any direct disjunction associated with it e.g. for coercion or
optional matching.
2021-11-08 13:51:23 -08:00
Pavel Yaskevich
106922545c Merge pull request #40074 from xedin/rdar-84879566
[ConstraintLocator] Allow simplification of constructor member with overloaded base
2021-11-08 10:13:49 -08:00
Anthony Latsis
a987ad619b Merge pull request #40082 from AnthonyLatsis/invalid-ext-bind
AST: Make sure malscoped extensions get their extended nominal computed
2021-11-08 20:52:20 +03:00
Anthony Latsis
5215fe5d95 AST: Make sure malscoped extensions get their extended nominal computed 2021-11-08 17:29:38 +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
Alejandro Alonso
98feb5e6ec Add availability to a few new tests (#40048)
its available, not availabile
2021-11-05 16:01:19 -07:00
Karoy Lorentey
6d33683c15 Merge pull request #40012 from lorentey/set-on-fire2
[stdlib] Optimize high-level Set operations
2021-11-05 13:48:40 -07:00
Doug Gregor
b4f65112b0 Merge pull request #40060 from DougGregor/propagate-async-to-inherited-designated-inits
Make sure we propagate 'async' down to inherited designed initializes.
2021-11-05 10:46:41 -07:00
Doug Gregor
d3a370914b Make sure we propagate 'async' down to inherited designed initializes.
Fixes a crash reported via rdar://80353441.
2021-11-04 21:21:37 -07:00
Pavel Yaskevich
573ae9bcac Merge pull request #40047 from xedin/rdar-83056143
[Diagnostics] A tailored diagnostic for Double<->CGFloat conversion via optional chaining
2021-11-04 16:14:58 -07:00
Pavel Yaskevich
293e97a761 Merge pull request #40022 from xedin/rdar-83072606
[Diagnostics] Coercion warning shouldn't assume that IUO is always optional
2021-11-04 00:42:05 -07:00
swift-ci
165c9b6208 Merge pull request #40038 from nate-chandler/rdar84984903 2021-11-03 23:04:13 -07:00
Pavel Yaskevich
ba9f6a24dd [TypeChecker] NFC: Add a test-case for rdar://83666783 2021-11-03 20:54:10 -07:00
Nate Chandler
d9b32f243c [Test] Fixed run line for lexical-lifetimes.swift.
rdar://84984903
2021-11-03 16:48:48 -07:00
Karoy Lorentey
172b1b8502 [test] Fix error in non-Darwin builds 2021-11-03 11:59:58 -07:00
Karoy Lorentey
5f65686cfc [test] Replace some more 9999 availabilities with SwiftStdlib 5.6 2021-11-02 20:43:35 -07:00