Fix wasm map usage and ignore annotation
This commit is contained in:
parent
ac2a734998
commit
6539b9deff
@ -364,13 +364,15 @@ class Compiler(
|
||||
for (base in allBaseNames) {
|
||||
val info = resolveCompileClassInfo(base) ?: continue
|
||||
for ((name, id) in info.fieldIds) {
|
||||
val prev = fieldIds.putIfAbsent(name, id)
|
||||
if (prev != null && prev != id) fieldConflicts.add(name)
|
||||
val prev = fieldIds[name]
|
||||
if (prev == null) fieldIds[name] = id
|
||||
else if (prev != id) fieldConflicts.add(name)
|
||||
if (id > maxFieldId) maxFieldId = id
|
||||
}
|
||||
for ((name, id) in info.methodIds) {
|
||||
val prev = methodIds.putIfAbsent(name, id)
|
||||
if (prev != null && prev != id) methodConflicts.add(name)
|
||||
val prev = methodIds[name]
|
||||
if (prev == null) methodIds[name] = id
|
||||
else if (prev != id) methodConflicts.add(name)
|
||||
if (id > maxMethodId) maxMethodId = id
|
||||
}
|
||||
}
|
||||
|
||||
@ -428,14 +428,14 @@ open class ObjClass(
|
||||
if (rec.type != ObjRecord.Type.Field && rec.type != ObjRecord.Type.ConstructorField) continue
|
||||
if (rec.visibility == Visibility.Private) continue
|
||||
val id = rec.fieldId ?: cls.assignFieldId(name, rec)
|
||||
result.putIfAbsent(name, id)
|
||||
if (!result.containsKey(name)) result[name] = id
|
||||
}
|
||||
cls.classScope?.objects?.forEach { (name, rec) ->
|
||||
if (rec.isAbstract) return@forEach
|
||||
if (rec.type != ObjRecord.Type.Field && rec.type != ObjRecord.Type.ConstructorField) return@forEach
|
||||
if (rec.visibility == Visibility.Private) return@forEach
|
||||
val id = rec.fieldId ?: cls.assignFieldId(name, rec)
|
||||
result.putIfAbsent(name, id)
|
||||
if (!result.containsKey(name)) result[name] = id
|
||||
}
|
||||
}
|
||||
return result
|
||||
@ -451,7 +451,7 @@ open class ObjClass(
|
||||
rec.type != ObjRecord.Type.Property &&
|
||||
rec.type != ObjRecord.Type.Delegated) continue
|
||||
val id = rec.methodId ?: cls.assignMethodId(name, rec)
|
||||
result.putIfAbsent(name, id)
|
||||
if (!result.containsKey(name)) result[name] = id
|
||||
}
|
||||
cls.classScope?.objects?.forEach { (name, rec) ->
|
||||
if (!includeAbstract && rec.isAbstract) return@forEach
|
||||
@ -460,7 +460,7 @@ open class ObjClass(
|
||||
rec.type != ObjRecord.Type.Property &&
|
||||
rec.type != ObjRecord.Type.Delegated) return@forEach
|
||||
val id = rec.methodId ?: cls.assignMethodId(name, rec)
|
||||
result.putIfAbsent(name, id)
|
||||
if (!result.containsKey(name)) result[name] = id
|
||||
}
|
||||
}
|
||||
return result
|
||||
@ -497,7 +497,7 @@ open class ObjClass(
|
||||
rec.type != ObjRecord.Type.Delegated
|
||||
) continue
|
||||
val id = rec.methodId ?: cls.assignMethodId(name, rec)
|
||||
methodIdMap.putIfAbsent(name, id)
|
||||
if (!methodIdMap.containsKey(name)) methodIdMap[name] = id
|
||||
if (id > maxId) maxId = id
|
||||
}
|
||||
cls.classScope?.objects?.forEach { (name, rec) ->
|
||||
@ -506,7 +506,7 @@ open class ObjClass(
|
||||
rec.type != ObjRecord.Type.Delegated
|
||||
) return@forEach
|
||||
val id = rec.methodId ?: cls.assignMethodId(name, rec)
|
||||
methodIdMap.putIfAbsent(name, id)
|
||||
if (!methodIdMap.containsKey(name)) methodIdMap[name] = id
|
||||
if (id > maxId) maxId = id
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ import kotlin.test.Ignore
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
@Ignore("Highlight tests postponed until ScriptTest baseline is restored")
|
||||
@Ignore
|
||||
class MapLiteralHighlightTest {
|
||||
|
||||
private fun spansToLabeled(text: String, spans: List<HighlightSpan>): List<Pair<String, HighlightKind>> =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user