digitalmars.D.learn - Array of associative array.
- Auto cannot infer type from initializer (67/67) Oct 28 2013 public static CompilerTable = [
- Auto cannot infer type from initializer (3/76) Oct 28 2013 The declaration is public static auto CompilerTable = [ ... ]
- Wolftein (3/82) Oct 28 2013 Had to use string[string][] instead of auto.
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (17/22) Oct 28 2013 Looks like a compiler bug to me. Reduced:
- Andrej Mitrovic (5/7) Oct 28 2013 Could be one of these:
public static CompilerTable = [ //////////////////////////////////////////////////////////// /// \brief DMD //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-debug", "-g" : "-g", "-gc" : "-gc", "-I" : "-I", "-inline" : "-inline", "-L" : "-L", "-lib" : "-lib", "-noboundscheck" : "-noboundscheck", "-O" : "-O", "-o-" : "-o-", "-odobjdir" : "-odobjdir", "-offilename" : "-offilename", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-w", "-wi" : "-wi"], //////////////////////////////////////////////////////////// /// \brief LDC //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-debug", "-g" : "-g", "-gc" : "-gc", "-I" : "-I", "-inline" : "-inline", "-L" : "-L", "-lib" : "-lib", "-noboundscheck" : "-noboundscheck", "-O" : "-O", "-o-" : "-o-", "-odobjdir" : "-odobjdir", "-offilename" : "-offilename", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-w", "-wi" : "-wi"], //////////////////////////////////////////////////////////// /// \brief GDC //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-fdebug", "-g" : "-g", "-gc" : "-g", "-I" : "-I", "-inline" : "-finline-functions", "-L" : "-Wl", "-lib" : "", "-noboundscheck" : "-noboundscheck", "-O" : "-O3", "-o-" : "-fsyntax-only", "-odobjdir" : "-od", "-offilename" : "-o", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-Wall", "-wi" : "-Wextra"] ]; Error: variable org.ghrum.installer.option.CompilerTable cannot infer type from initializer
Oct 28 2013
On Monday, 28 October 2013 at 21:26:41 UTC, Auto cannot infer type from initializer wrote:public static CompilerTable = [ //////////////////////////////////////////////////////////// /// \brief DMD //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-debug", "-g" : "-g", "-gc" : "-gc", "-I" : "-I", "-inline" : "-inline", "-L" : "-L", "-lib" : "-lib", "-noboundscheck" : "-noboundscheck", "-O" : "-O", "-o-" : "-o-", "-odobjdir" : "-odobjdir", "-offilename" : "-offilename", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-w", "-wi" : "-wi"], //////////////////////////////////////////////////////////// /// \brief LDC //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-debug", "-g" : "-g", "-gc" : "-gc", "-I" : "-I", "-inline" : "-inline", "-L" : "-L", "-lib" : "-lib", "-noboundscheck" : "-noboundscheck", "-O" : "-O", "-o-" : "-o-", "-odobjdir" : "-odobjdir", "-offilename" : "-offilename", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-w", "-wi" : "-wi"], //////////////////////////////////////////////////////////// /// \brief GDC //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-fdebug", "-g" : "-g", "-gc" : "-g", "-I" : "-I", "-inline" : "-finline-functions", "-L" : "-Wl", "-lib" : "", "-noboundscheck" : "-noboundscheck", "-O" : "-O3", "-o-" : "-fsyntax-only", "-odobjdir" : "-od", "-offilename" : "-o", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-Wall", "-wi" : "-Wextra"] ]; Error: variable org.ghrum.installer.option.CompilerTable cannot infer type from initializerThe declaration is public static auto CompilerTable = [ ... ]
Oct 28 2013
On Monday, 28 October 2013 at 21:27:46 UTC, Auto cannot infer type from initializer wrote:On Monday, 28 October 2013 at 21:26:41 UTC, Auto cannot infer type from initializer wrote:Had to use string[string][] instead of auto.public static CompilerTable = [ //////////////////////////////////////////////////////////// /// \brief DMD //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-debug", "-g" : "-g", "-gc" : "-gc", "-I" : "-I", "-inline" : "-inline", "-L" : "-L", "-lib" : "-lib", "-noboundscheck" : "-noboundscheck", "-O" : "-O", "-o-" : "-o-", "-odobjdir" : "-odobjdir", "-offilename" : "-offilename", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-w", "-wi" : "-wi"], //////////////////////////////////////////////////////////// /// \brief LDC //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-debug", "-g" : "-g", "-gc" : "-gc", "-I" : "-I", "-inline" : "-inline", "-L" : "-L", "-lib" : "-lib", "-noboundscheck" : "-noboundscheck", "-O" : "-O", "-o-" : "-o-", "-odobjdir" : "-odobjdir", "-offilename" : "-offilename", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-w", "-wi" : "-wi"], //////////////////////////////////////////////////////////// /// \brief GDC //////////////////////////////////////////////////////////// ["-c" : "-c", "-debug" : "-fdebug", "-g" : "-g", "-gc" : "-g", "-I" : "-I", "-inline" : "-finline-functions", "-L" : "-Wl", "-lib" : "", "-noboundscheck" : "-noboundscheck", "-O" : "-O3", "-o-" : "-fsyntax-only", "-odobjdir" : "-od", "-offilename" : "-o", "-profile" : "-profile", "-release" : "-release", "-unittest" : "-unittest", "-w" : "-Wall", "-wi" : "-Wextra"] ]; Error: variable org.ghrum.installer.option.CompilerTable cannot infer type from initializerThe declaration is public static auto CompilerTable = [ ... ]
Oct 28 2013
On 10/28/2013 02:39 PM, Wolftein wrote:Looks like a compiler bug to me. Reduced: void foo(T)(T) { pragma(msg, T.stringof); } void main() { // Works and prints string[string][] pragma(msg, typeof([ [ "a" : "a"] ]).stringof); // Works and prints string[string][] foo([ [ "a" : "a"] ]); // However, this fails auto a = [ [ "a" : "a"] ]; } Is there a reason why the last line cannot be compiled? AliHad to use string[string][] instead of auto.Error: variable org.ghrum.installer.option.CompilerTable cannot infer type from initializerThe declaration is public static auto CompilerTable = [ ... ]
Oct 28 2013
On 10/28/13, Ali =C7ehreli <acehreli yahoo.com> wrote:Looks like a compiler bug to me. Reduced: Is there a reason why the last line cannot be compiled?Could be one of these: http://d.puremagic.com/issues/show_bug.cgi?id=3D9295 http://d.puremagic.com/issues/show_bug.cgi?id=3D9520 There's a bunch of these array literal bugs.
Oct 28 2013