The swift version still don’t work.
Compiling to dotNet the code run and fail to show the last element and compiling to Jaa don’t run.
Follow the code again:
import System.Collections.Generic
import System.Linq
import System.Text
var L1 = [String: [String: [String: String]]]()
var L2 = [String: [String: String]]()
var L3 = [String: String]()
L3["A"] = "1"
L3["B"] = "2"
L2["C"] = L3
L1["D"] = L2
for (k3, v3) in L3 {
println(k3 + ": " + v3)
}
println()
for (k2, v2) in L2 {
println(k2 + ": ")
for (k3, v3) in v2 {
println(" " + k3 + ":" + v3)
}
}
println()
for (k1, v1) in L1 {
println(k1 + ":")
for (k2, v2) in v1 {
println(" " + k2 + ":")
for (k3, v3) in v2 {
println(" " + k3 + ": " + v3)
}
}
}
Error at dotNet:
D:
C:
A: System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]
B: System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]
Error at Java:
Listening for transport dt_socket at address: 53147
~> Process started.
!> Exception on thread 0001 ()
!> Type: java.security.PrivilegedActionException
!> Message: (null)
An exception occured in test_java, thread 0001 ()
Type: java.security.PrivilegedActionException
Message:
Call Stack:
0000000000000000, , , AccessController.doPrivileged(), (null)
0000000000000000, , URLClassPath.java, URLClassPath$JarLoader.ensureOpen(), (null)
0000000000000000, , URLClassPath.java, URLClassPath$JarLoader.<init>(), (null)
0000000000000000, , URLClassPath.java, URLClassPath$3.run(), (null)
0000000000000000, , URLClassPath.java, URLClassPath$3.run(), (null)
0000000000000000, , , AccessController.doPrivileged(), (null)
0000000000000000, , URLClassPath.java, URLClassPath.getLoader(), (null)
0000000000000000, , URLClassPath.java, URLClassPath.getLoader(), (null)
0000000000000000, , URLClassPath.java, URLClassPath.getNextLoader(), (null)
0000000000000000, , URLClassPath.java, URLClassPath.getResource(), (null)
0000000000000000, , , URLClassLoader$1.run(), (null)
0000000000000000, , , URLClassLoader$1.run(), (null)
0000000000000000, , , AccessController.doPrivileged(), (null)
0000000000000000, , , URLClassLoader.findClass(), (null)
0000000000000000, , , ClassLoader.loadClass(), (null)
0000000000000000, , , ClassLoader.loadClass(), (null)
0000000000000000, , Launcher.java, Launcher$AppClassLoader.loadClass(), (null)
0000000000000000, , , ClassLoader.loadClass(), (null)
0000000000000000, , LauncherHelper.java, LauncherHelper.checkAndLoadMain(), (null)