mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] Add inaccessible member diagnostic
This commit is contained in:
@@ -30,7 +30,9 @@ class SimpleChildClass : SimpleClass {
|
||||
|
||||
// The enum should have a case for each of the vars.
|
||||
// NOTE: This expected error will need to be removed in the future.
|
||||
let _ = SimpleChildClass.CodingKeys.w // expected-error {{'CodingKeys' is inaccessible due to 'private' protection level}}
|
||||
let _ = SimpleChildClass.CodingKeys.w
|
||||
// expected-error@-1 {{'CodingKeys' is inaccessible due to 'private' protection level}}
|
||||
// expected-error@-2 {{type 'SimpleClass.CodingKeys' has no member 'w'}}
|
||||
|
||||
// Inherited vars should not be part of the CodingKeys enum.
|
||||
// NOTE: This expected error will need to be updated in the future.
|
||||
|
||||
Reference in New Issue
Block a user