zoukankan      html  css  js  c++  java
  • Postfix Self Expression

    Postfix Self Expression

    A postfix self expression consists of an expression or the name of a type, immediately followed by .self. It has the following forms:

    • expression.self
    • type.self

    The first form evaluates to the value of the expression. For example, x.self evaluates to x.

    The second form evaluates to the value of the type. Use this form to access a type as a value. For example, because SomeClass.self evaluates to the SomeClass type itself, you can pass it to a function or method that accepts a type-level argument.

    GRAMMAR OF A SELF EXPRESSION

    postfix-self-expression → postfix-expression­self­

     

    https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Expressions.html#//apple_ref/swift/grammar/postfix-self-expression

  • 相关阅读:
    排球运动规则简介
    我与计算机
    我和电脑的不解之缘
    作业
    怎样成为一个高手 观后感
    本周作业
    作业个人
    本周作业
    本周总结
    本周总结(13周)
  • 原文地址:https://www.cnblogs.com/feng9exe/p/9092315.html
Copyright © 2011-2022 走看看