pragma(inline) doesnt work on local functions : DMD

claptrap clap at trap.com
Mon Sep 2 22:16:53 UTC 2024


Seems like an oversight?

```d
int Foo()
{
     pragma(inline,true)
     int GetFoo() { return 42; }
     return GetFoo();
}
```

GetFoo isn't inlined, but inlines OK if you pass -inline to the 
compiler

Also inlines OK if you define GetFoo outside of Foo



More information about the Digitalmars-d mailing list