Skip to content

Commit b342e88

Browse files
committed
[Test] fix generic type inference
1 parent f340920 commit b342e88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Samples/JavaDependencySampleApp/Sources/JavaDependencySample/OrgAndrejsJsonTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ enum OrgAndrejsJsonTests {
2525
let json = Json(#"{"host": "localhost", "port": 80}"#)
2626

2727
precondition(json.hasOwnProperty("port"))
28+
let port: JavaInteger = json.get("port")!
2829

29-
print(json.get("port").toString())
30-
precondition(json.get("port").as(JavaInteger.self)!.intValue() == 80)
30+
precondition(port.toString() == "80")
31+
precondition(port.intValue() == 80)
3132

3233
print("Reading swift-java.config inside OrgAndrejsJson folder...")
3334

0 commit comments

Comments
 (0)