Support platform modifier in back-ends, add multi-platform integration test

Skip 'platform' declarations completely in back-ends
This commit is contained in:
Alexander Udalov
2016-10-28 19:21:27 +03:00
parent c1eebacd55
commit a4169416ad
10 changed files with 127 additions and 13 deletions
+8
View File
@@ -0,0 +1,8 @@
platform class Printer {
fun print(message: String)
}
fun main(args: Array<String>) {
val printer = Printer()
printer.print("Hello, world!")
}
+5
View File
@@ -0,0 +1,5 @@
impl class Printer {
fun print(message: String) {
println("JS says: " + message)
}
}
+5
View File
@@ -0,0 +1,5 @@
impl class Printer {
fun print(message: String) {
println("JVM says: " + message)
}
}
+11
View File
@@ -0,0 +1,11 @@
-- Common --
Exit code: OK
Output:
-- JVM --
Exit code: OK
Output:
-- JS --
Exit code: OK
Output: