We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 476f92d commit fb9d8d8Copy full SHA for fb9d8d8
test/IDE/newtype.swift
@@ -31,3 +31,23 @@
31
// PRINT-NEXT: static let secondEntry: ClosedEnum
32
// PRINT-NEXT: static let thirdEntry: ClosedEnum
33
// PRINT-NEXT: }
34
+
35
+// RUN: %target-parse-verify-swift -I %S/Inputs/custom-modules
36
+import Newtype
37
38
+func tests() {
39
+ let errOne = ErrorDomain.one
40
+ errOne.process()
41
42
+ let fooErr = Foo.err
43
+ fooErr.process()
44
+ Foo().process() // expected-error{{value of type 'Foo' has no member 'process'}}
45
46
+ let thirdEnum = ClosedEnum.thirdEntry
47
+ thirdEnum.process()
48
+ // expected-error@-1{{value of type 'ClosedEnum' has no member 'process'}}
49
50
+ let _ = ErrorDomain(rawValue: thirdEnum.rawValue)
51
+ let _ = ClosedEnum(rawValue: errOne.rawValue)
52
53
+}
0 commit comments