www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16481] New: invalid code accepted leading to


          Issue ID: 16481
           Summary: invalid code accepted leading to
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

% cat mod.d
void blah()
    import std.algorithm;
    import std.conv;
    int[][] a;
    a.map!(x => x.map!to);
% dmd mod.d
Undefined symbols for architecture x86_64:
referenced from:
in mod.o
  "_main", referenced from:
     implicit entry/start for main executable
     (maybe you meant: __d_main_args,
_D4core6thread6Thread7sm_mainC4core6thread6Thread )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1

That code shouldn't compile (because of using std.conv.to without a target
type), so it should never hit the linker at all.

Sep 09 2016