forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request swiftlang#74991 from hamishknight/mod-access
[Index] Mark accessors as implicit in modules
- Loading branch information
Showing
3 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// RUN: %empty-directory(%t) | ||
// | ||
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/Mod.swiftmodule -module-name Mod %s | ||
// RUN: %target-swift-ide-test -print-indexed-symbols -module-to-print Mod -source-filename %s -I %t | %FileCheck %s | ||
|
||
// rdar://130775560 - Make sure the accessors are marked implicit in the index | ||
// data for the module. | ||
public struct S { | ||
// CHECK-DAG: instance-property/Swift | x | s:3Mod1SV1xSivp | Def,RelChild | ||
// CHECK-DAG: instance-method/acc-get/Swift | getter:x | s:3Mod1SV1xSivg | Def,Impl,RelChild,RelAcc | ||
public let x = 0 | ||
|
||
// CHECK-DAG: instance-property/Swift | y | s:3Mod1SV1ySivp | Def,RelChild | ||
// CHECK-DAG: instance-method/acc-get/Swift | getter:y | s:3Mod1SV1ySivg | Def,Impl,RelChild,RelAcc | ||
public var y: Int { | ||
0 | ||
} | ||
|
||
// CHECK-DAG: instance-property/Swift | z | s:3Mod1SV1zSivp | Def,RelChild | ||
// CHECK-DAG: instance-method/acc-get/Swift | getter:z | s:3Mod1SV1zSivg | Def,Impl,RelChild,RelAcc | ||
// CHECK-DAG: instance-method/acc-set/Swift | setter:z | s:3Mod1SV1zSivs | Def,Impl,RelChild,RelAcc | ||
public var z: Int { | ||
get { 0 } | ||
set {} | ||
} | ||
|
||
// CHECK-DAG: instance-property/Swift | a | s:3Mod1SV1aSivp | Def,RelChild | ||
// CHECK-DAG: instance-method/acc-get/Swift | getter:a | s:3Mod1SV1aSivg | Def,Impl,RelChild,RelAcc | ||
public var a: Int { | ||
@inlinable | ||
get { 0 } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters