Commit Graph

17 Commits

Author SHA1 Message Date
Andrew Rahn
5403d1f658 Testcase for rdar38514252: didSet called on read. 2018-04-20 09:12:49 -05:00
Slava Pestov
be78626ea8 Sema: Add test case for lazy property 'resetting' that no longer works
Due to a serendipitous confluence of interesting behaviors,
Swift 3 allowed you to define a lazy property with an IUO
type, and setting the property to nil would 'reset' it,
re-evaluating the lazy getter the next time the property
was accessed.

This was not intended behavior and it no longer works,
so add a test that it no longer works.

Fixes <rdar://problem/32687168> and
<https://bugs.swift.org/browse/SR-5172>.
2017-07-11 17:00:36 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Slava Pestov
8277dd6bd7 SILGen: Correctly set MaterializedLValue::origSelfType for static properties
This is exposed by subsequent patches.
2016-03-11 11:27:05 -08:00
Daniel Duan
2bc78b8c09 [stdlib] update for 'inout' adjustment (SE-0031) 2016-02-26 12:02:29 -08:00
Slava Pestov
ac5f44e913 SILGen: Fix materializeForSet for observing accessors
The following patch introduced a regression where materializeForSet
did not invoke didSet/willSet for stored properties with observers:

<249242b08d>

The old SILGen materializeForSet was only used for witness thunks,
where it used Ordinary access semantics for the storage.

When I switched over to using the new materializeForSet implementation
for static thunks too, I added some logic to use DirectToStorage access
semantics where appropriate, however this was wrong for observable
properties, which need DirectToAccessor semantics.

Fixes <rdar://problem/24315392>.
2016-01-23 23:39:30 -08:00
practicalswift
fa0b339a21 Fix typos. 2015-12-26 17:51:59 +01:00
Arnold Schwaighofer
859fbc0162 More executable_test for the test directory
Swift SVN r29280
2015-06-03 23:28:51 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
David Farler
3530e542ca Static class stored properties
rdar://problem/19422120

Allow static/class final stored properties to get through to the
mangled global property implementations.

Swift SVN r24303
2015-01-09 09:54:18 +00:00
Chris Lattner
5b49d59c57 Remove the @ from @final and @lazy, the last major piece of
rdar://17168115.

Also, reinstate the ARM driver change and testcase that I removed
in my last patch.


Swift SVN r19790
2014-07-10 06:23:27 +00:00
Chris Lattner
1adbbd7721 add a testcase for: <rdar://problem/17226384> Setting an @lazy optional property to nil has a strange behavior (Swift)
which JoeP fixed in r19731


Swift SVN r19754
2014-07-09 22:45:45 +00:00
Chris Lattner
83b33303ae add a testcase for rdar://17192398, which is already fixed by the nil literal rework
Swift SVN r19086
2014-06-22 22:22:04 +00:00
Chris Lattner
7d6740cba7 fix rdar://16805609 - <rdar://problem/16805609> Providing a 'didSet' in a generic override doesn't work
The functional difference is:

 ClassDecl *DeclContext::isClassOrClassExtensionContext() const {
-  if (auto ctx = getDeclaredTypeOfContext())
+  if (auto ctx = getDeclaredTypeInContext())

As expected, I didn't get the sense of Of/In right, manifesting in a nasty bug.



Swift SVN r18216
2014-05-16 22:05:12 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Joe Groff
637c4e8171 Fold Interpreter and Interpreter/SIL tests.
There is only SIL. No reason to keep a subdirectory around.

Swift SVN r6029
2013-07-05 23:11:44 +00:00