Skip to content

Conversation

niw
Copy link
Contributor

@niw niw commented Jan 3, 2021

Problems

Current Swift runtime contains multiple usage of var which is not necessary and recent Swift compiler emits warning for such var usage.
For example:

antlr/antlr4/runtime/Swift/Sources/Antlr4/Lexer.swift:135:13: warning: variable 'tokenStartMarker' was never mutated; consider changing to 'let' constant
        var tokenStartMarker = _input.mark()
        ~~~ ^
        let

Solution
Since there is no easy way to silence it from compiler option especially when it provided in Swift Package Manager,
Fix these usage of var instead of let causes Swift compiler warnings.

@niw niw force-pushed the silence_swift_compiler_warnings branch from 0ecc0f5 to a0536d6 Compare January 4, 2021 21:18
These usage of `var` instead of `let` causes Swift compiler
warnings.
@hanjoes
Copy link
Member

hanjoes commented Oct 11, 2021

will tryy to merge it as part of #3301

@parrt parrt added this to the 4.9.3 milestone Oct 11, 2021
@parrt parrt merged commit 368d667 into antlr:master Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants