D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15717 - iota: "Error: cannot implicitly convert expression (cast(int)pastLast - 1) of type int to ushort"
Summary: iota: "Error: cannot implicitly convert expression (cast(int)pastLast - 1) of...
Status: RESOLVED DUPLICATE of issue 16246
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Mac OS X
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-24 07:07 UTC by Timothee Cour
Modified: 2017-05-14 23:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Timothee Cour 2016-02-24 07:07:03 UTC
DMD64 D Compiler v2.067.1

std/range/package.d(4056): Error: cannot implicitly convert expression (cast(int)pastLast - 1) of type int to ushort
----
void test(){
  import std.range;
  ushort a=10;
  ushort b=20;
  auto ret=iota(a, b, 10);
}
----
Comment 1 Steven Schveighoffer 2017-05-14 23:14:40 UTC
16246 is about to be fixed, and this should be fixed as well.

*** This issue has been marked as a duplicate of issue 16246 ***