You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message:"@JS protocol property getter must declare throws(JSException)",
1695
+
hint:"Use { get throws(JSException) } syntax"
1696
+
)
1697
+
continue
1698
+
}
1699
+
1700
+
guardlet getter = getterAccessor else{
1701
+
diagnose(node: accessorBlock, message:"Protocol property must have a getter")
1702
+
continue
1703
+
}
1704
+
1705
+
// Check for setter - not allowed with throwing getter
1706
+
if case .accessors(let accessors)= accessorBlock.accessors {
1707
+
if accessors.contains(where:{ $0.accessorSpecifier.tokenKind ==.keyword(.set)}){
1708
+
diagnose(
1709
+
node: accessorBlock,
1710
+
message:"@JS protocol cannot have { get set } properties",
1711
+
hint:
1712
+
"Use readonly property with setter method: var \(propertyName): \(typeAnnotation.type.trimmedDescription) { get throws(JSException) } and func set\(propertyName.capitalized)(_ value: \(typeAnnotation.type.trimmedDescription)) throws(JSException)"
0 commit comments