Files
swift-mirror/test/multifile/property-wrappers-rdar51725203.swift
Doug Gregor ef17b38106 [SE-0258] Trigger synthesis of _foo/$foo from name lookup.
Fix a bug with cross-file uses of the synthesized _foo/$foo for
properties with attached wrappers by implicitly triggering the
appropriate synthesis during name lookup.

Fixes rdar://problem/51725203.
2019-06-27 00:08:31 -07:00

10 lines
357 B
Swift

// RUN: %target-swift-frontend -typecheck -verify -primary-file %s %S/Inputs/rdar51725203.swift
func test(sm: StructModel, cm: ClassModel) {
_ = sm.$foo
_ = cm.$foo
_ = sm._bar // expected-error{{'_bar' is inaccessible due to 'private' protection level}}
_ = cm._bar // expected-error{{'_bar' is inaccessible due to 'private' protection level}}
}