Skip to content

Code.Fragment.surround_context returns none on nested alias dot call #12829

@lukaszsamson

Description

@lukaszsamson

Elixir and Erlang/OTP versions

Erlang/OTP 25 [erts-13.2.2.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Elixir 1.15.4 (compiled with Erlang/OTP 25)

Operating system

any

Current behavior

This works

Code.Fragment.surround_context("Collectable.into(a)", {1, 3})    
%{begin: {1, 1}, context: {:alias, ~c"Collectable"}, end: {1, 12}}

This also works

Code.Fragment.surround_context("Collectable.Map", {1, 3})        
%{begin: {1, 1}, context: {:alias, ~c"Collectable.Map"}, end: {1, 16}}

but this returns :none

Code.Fragment.surround_context("Collectable.Map.into(a)", {1, 3})
:none

Expected behavior

%{begin: {1, 1}, context: {:alias, ~c"Collectable.Map"}, end: {1, 16}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions