diff --git a/runtime/Swift/Sources/Antlr4/atn/ATNConfigSet.swift b/runtime/Swift/Sources/Antlr4/atn/ATNConfigSet.swift index 66e650237..15254b350 100644 --- a/runtime/Swift/Sources/Antlr4/atn/ATNConfigSet.swift +++ b/runtime/Swift/Sources/Antlr4/atn/ATNConfigSet.swift @@ -321,17 +321,17 @@ public class ATNConfigSet: Hashable, CustomStringConvertible { return Array(configToAlts.values) } - public final func getStateToAltMap() -> [ATNState: BitSet] { + public func getStateToAltMap() -> [Int: BitSet] { let length = configs.count - var m = [ATNState: BitSet]() + var m = [Int: BitSet]() for i in 0.. [ATNState: BitSet] { - return configs.getStateToAltMap() - } - public static func hasStateAssociatedWithOneAlt(_ configs: ATNConfigSet) -> Bool { - let x = getStateToAltMap(configs) + let x = configs.getStateToAltMap() for alts in x.values { if alts.cardinality() == 1 { return true