Skip to content

Constant lookup falls off top scope in new compiler scoping logic #440

@headius

Description

@headius

The top-level scope isn't handled right, so we fall through during lexical search and never get to hierarchical search below.

system ~/projects/jruby $ jruby -X+C -e "module Foo; Symbol = 1; end; class Bar; include Foo; def sym; Symbol; end; end; p Bar.new.sym"
Symbol

system ~/projects/jruby $ jruby -X-C -e "module Foo; Symbol = 1; end; class Bar; include Foo; def sym; Symbol; end; end; p Bar.new.sym"
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions