Skip to content

Cute code causing explorer outline to go blank #557

@tanzanite777

Description

@tanzanite777

Type: Bug

I can not imagine me ever using this code, but reporting it might help ironing out some likely bugs.

Example code:

class Bug {
    // if this method exist in a file then outline panel in explorer sidebar goes blank
    // - diplaying greyed "No symbols found in document this-n-that".
    // Comment it out to see outline spring back to life.
    static function defer(?SplStack &$_, callable $callback) : void {
        $_ ??= new class() extends SplStack {
            public function __destruct() {
                while($this->count() > 0) call_user_func($this->pop());
            }
        };
        $_->push($callback);
    }
}

The code in reality works as advertised (Go-lang style defer hack/functionality) with no issues and as far as i can see is also perfectly legal. Right?

Extension version: 1.46.15409
VS Code version: Code 1.89.0 (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:09:22.859Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.88GB (7.30GB free)
Process Argv --crash-reporter-id adf79977-8c83-4303-918e-a7dfc5f31bf1
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
tftest:31042121
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
showvideot:31016892
chatpanelc:31018788
dsvsc021:30996838
bdiig495:31013172
fchga941:31046352
pythonprt:31039817
dwnewjupyter:31039675

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