也许我在这里疯了,但是Swift 4.1.2中的<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".NumbersActivity"
android:label="@string/category_numbers"
android:parentActivityName=".MainActivity">
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity"/>
</activity>
<activity
android:name=".FamilyActivity"
android:label="@string/category_family"
android:parentActivityName=".MainActivity">
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity"/>
</activity>
<activity
android:name=".ColorsActivity"
android:label="@string/category_colors"
android:parentActivityName=".MainActivity">
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity"/>
</activity>
<activity
android:name=".PhrasesActivity"
android:label="@string/category_phrases"
android:parentActivityName=".MainActivity">
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity"/>
</activity>
</application>
在不应该出现的类型中将其属性显示在Swift的自动完成类型中。
例如,此扩展名:
extension Array where Element == String
然后开始输入:
extension Array where Element == String {
public var test: [String] {
return ["test"]
}
}
...
and Swift建议[123].te
属性在[Int]上也可用,这是不可能的。然后语法检查器弹出错误:
表达式类型不明确,没有更多上下文
有什么我想念的吗?也许需要使用一些其他/附加的一致性限制?还是这是一个Swift错误?