File: debug-client-discriminator.swift

package info (click to toggle)
swiftlang 6.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,532 kB
  • sloc: cpp: 9,901,743; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (43 lines) | stat: -rw-r--r-- 2,031 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// RUN: %empty-directory(%t)

// RUN: %target-swift-frontend -emit-module -o %t -module-name HasPrivateAccess %S/Inputs/HasPrivateAccess1.swift %S/Inputs/HasPrivateAccess2.swift
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control 2>&1 | %FileCheck -check-prefix=CHECK-ERROR %s
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _5AB3F657DD2A7E5E793501C5FA480C3D | %FileCheck -check-prefix=CHECK-INT %s
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _0D6EC78101B0986747C7103C2739A767 | %FileCheck -check-prefix=CHECK-STRING %s

import HasPrivateAccess

// CHECK-ERROR: ambiguous use of 'global'
// CHECK-INT: let unqualified: Int
// CHECK-STRING: let unqualified: String
let unqualified = global

// CHECK-ERROR: ambiguous use of 'global'
// CHECK-INT: let qualified: Int
// CHECK-STRING: let qualified: String
let qualified = HasPrivateAccess.global

// CHECK-ERROR: ambiguous use of 'method()'
// CHECK-INT: let result: Int?
// CHECK-STRING: let result: String?
let result = HasPrivateAccess.MyStruct.method()

// CHECK-ERROR: let processedInt: Int
// CHECK-INT: let processedInt: Int
// CHECK-STRING: let processedInt: Int
let processedInt = process(1)

// CHECK-ERROR: let processedIntQualified: Int
// CHECK-INT: let processedIntQualified: Int
// CHECK-STRING: let processedIntQualified: Int
let processedIntQualified = MyStruct.process(1)

// CHECK-ERROR: let processedString: String
// CHECK-INT: let processedString: String
// CHECK-STRING: let processedString: String
let processedString = process("abc")

// CHECK-ERROR: let processedStringQualified: String
// CHECK-INT: let processedStringQualified: String
// CHECK-STRING: let processedStringQualified: String
let processedStringQualified = MyStruct.process("abc")