diff --git a/base/kotlin/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.kt b/head/kotlin/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.kt
index 0ec4cae..88bf9fd 100644
--- a/base/kotlin/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.kt
+++ b/head/kotlin/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.kt
@@ -12,6 +12,6 @@ class TopLevel(elements: Collection<Long>) : ArrayList<Long>(elements) {
     public fun toJson() = klaxon.toJsonString(this)
 
     companion object {
-        public fun fromJson(json: String) = TopLevel(klaxon.parseArray<Long>(json)!!)
+        public fun fromJson(json: String) = TopLevel(klaxon.parseArray<Any>(json)!!.map { when (it) { is Int -> it.toLong(); is Long -> it; else -> throw IllegalArgumentException() } })
     }
 }
diff --git a/head/schema-kotlin/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.kt
new file mode 100644
index 0000000..88bf9fd
--- /dev/null
+++ b/head/schema-kotlin/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.kt
@@ -0,0 +1,17 @@
+// To parse the JSON, install Klaxon and do:
+//
+//   val topLevel = TopLevel.fromJson(jsonString)
+
+package quicktype
+
+import com.beust.klaxon.*
+
+private val klaxon = Klaxon()
+
+class TopLevel(elements: Collection<Long>) : ArrayList<Long>(elements) {
+    public fun toJson() = klaxon.toJsonString(this)
+
+    companion object {
+        public fun fromJson(json: String) = TopLevel(klaxon.parseArray<Any>(json)!!.map { when (it) { is Int -> it.toLong(); is Long -> it; else -> throw IllegalArgumentException() } })
+    }
+}
