Skip to content

JIT loses line numbers in some warnings? #7675

@enebo

Description

@enebo

There is one warning emitted in this script for duplicated :c:

def m(a:); a; end
h = { a: 1 }
p m(a: 2, **h)

#{a: 1, **{a: 2, b: 3, c: 1}, c: 3}

{d: 1, **{a: 2, b: 3, c: 1}, c: 3}

h = {a: 2, b: 3, c: 1}
{a: 1, **h, c: 3}

Interpreter runs this fine:

system ~/work/jruby fix_7672 1802% jruby --dev ../snippets/dup1.rb 
1
../snippets/dup1.rb:7: warning: key :c is duplicated and overwritten on line 7

JIT is 0+1 (context.getLine() + 1):

system ~/work/jruby fix_7672 1805% jruby -Xjit.threshold=0 ../snippets/dup1.rb 
1
../snippets/dup1.rb:7: warning: key :c is duplicated and overwritten on line 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions