fix <rdar://problem/19259730> Using mutating methods in a struct initializer with a let property is rejected

while we're at it, improve the QoI for actually-invalid mutating method calls in struct initalizers.


Swift SVN r24030
This commit is contained in:
Chris Lattner
2014-12-19 06:52:37 +00:00
parent c11eb40008
commit 3a7d8df92b
5 changed files with 59 additions and 3 deletions

View File

@@ -92,6 +92,10 @@ ERROR(variable_escape_before_initialized,sil_analysis,none,
ERROR(self_use_before_init_in_delegatinginit,sil_analysis,none,
"use of '%0' in delegating initializer before self.init is called",
(StringRef))
ERROR(self_use_before_init_in_structinit,sil_analysis,none,
"use of '%0' in delegating initializer before self.init is called",
(StringRef))
ERROR(variable_addrtaken_before_initialized,sil_analysis,none,
"address of variable '%0' taken before it is initialized",
(StringRef))