enum scope
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 8 12:11:56 PDT 2014
On 2014-06-08 19:50, Walter Bright wrote:
> Does that apply to all symbols in Swift, or just enums?
I'm not sure if it applies to all symbols but it's not limited to enums.
The reference documentation [1] says:
"An implicit member expression is an abbreviated way to access a member
of a type, such as an enumeration case or a class method, in a context
where type inference can determine the implied type. It has the
following form:
.member name
For example:
var x = MyEnumeration.SomeValue
x = .AnotherValue
"
[1]
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Expressions.html#//apple_ref/swift/grammar/implicit-member-expression
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list