Skip to content

Commit

Permalink
コンパイルエラー修正
Browse files Browse the repository at this point in the history
  • Loading branch information
outlandkarasu committed Feb 21, 2022
1 parent 2e2a859 commit 37d365a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/range_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ unittest
}

// 自作関数を動的配列に対して使用
values = [1, 2, 3];
int[] values = [1, 2, 3, 4];
assert(myAny(values, 1));
assert(!myAny(values, 100));

Expand All @@ -301,7 +301,6 @@ unittest

// しかし、動的配列用のRangeのメンバーをstd.rangeからimportしないと、
// 動的配列の各メンバーを利用することはできません。
int[] values = [1, 2, 3, 4];
static assert(!__traits(compiles, {
values.empty;
values.popFront;
Expand Down

0 comments on commit 37d365a

Please sign in to comment.