www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22127] New: compiler assertion failure parser on UDA and

https://issues.dlang.org/show_bug.cgi?id=22127

          Issue ID: 22127
           Summary: compiler assertion failure parser on UDA and function
                    literal
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: ice
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: b2.temp gmx.com



```
alias getOne =  (0) function int () => 1;
```



---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the
reduction.
---
DMD v2.097.0-151-ga601b03d2-dirty
predefs   single_module runnable_module run_single_module DigitalMars
LittleEndian D_Version2 all D_SIMD Posix ELFv1 linux CRuntime_Glibc
CppRuntime_Gcc D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC assert D_ModuleInfo
D_Exceptions D_TypeInfo D_HardFloat
binary    dlang/dmd/generated/linux/release/64/dmd
version   v2.097.0-151-ga601b03d2-dirty
config    dlang/dmd/generated/linux/release/64/dmd.conf
DFLAGS    -Idlang/dmd/generated/linux/release/64/../../../../../druntime/import
-Idlang/dmd/generated/linux/release/64/../../../../../phobos
-L-Ldmd/generated/linux/release/64/../../../../../phobos/generated/linux/release/64
-L--export-dynamic -fPIC
---
core.exception.AssertError src/dmd/parse.d(4582): Assertion failure
----------------
??:? _d_assertp [0x8ee894]
src/dmd/parse.d:4582 dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*
dmd.parse.Parser!(dmd.astcodegen.ASTCodegen).Parser.parseDeclarations(bool,
dmd.parse.PrefixAttributes!(dmd.astcodegen.ASTCodegen).PrefixAttributes*,
const(char)*) [0x75e74d]
src/dmd/parse.d:599 dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*
dmd.parse.Parser!(dmd.astcodegen.ASTCodegen).Parser.parseDeclDefs(int,
dmd.dsymbol.Dsymbol*,
dmd.parse.PrefixAttributes!(dmd.astcodegen.ASTCodegen).PrefixAttributes*)
[0x754aad]
src/dmd/parse.d:430 dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*
dmd.parse.Parser!(dmd.astcodegen.ASTCodegen).Parser.parseModule() [0x754602]
src/dmd/dmodule.d:1064 dmd.dmodule.Module
dmd.dmodule.Module.parseModule!(dmd.astcodegen.ASTCodegen).parseModule()
[0x64249e]
src/dmd/dmodule.d:785 _ZN6Module5parseEv [0x6406b0]
src/dmd/mars.d:394 int dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) [0x5cab97]
src/dmd/mars.d:1070 _Dmain [0x5cd109]

--
Jul 18