Re: Strange error

2021-03-23 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 22 March 2021 at 07:52:14 UTC, MichaelJames wrote: Tell me, did you manage to solve this problem? https://github.com/dlang/dmd/pull/12300

Re: Strange error

2021-03-22 Thread MichaelJames via Digitalmars-d-learn
On Sunday, 21 March 2021 at 07:18:10 UTC, Jack Applegame wrote: Could someone please explain what is wrong with this code? https://glot.io/snippets/fwxn2198kv ```d import std.stdio; struct Sample{ void function() func1; void function() func2; } void noth(Sample smpl)() { smpl.func1(); /

Re: Strange error

2021-03-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/21/21 3:18 AM, Jack Applegame wrote: Could someone please explain what is wrong with this code? https://glot.io/snippets/fwxn2198kv ```d import std.stdio; struct Sample{   void function() func1;   void function() func2; } void noth(Sample smpl)() {   smpl.func1(); // Error: expression

Re: Strange error

2021-03-21 Thread Jack Applegame via Digitalmars-d-learn
On Sunday, 21 March 2021 at 08:45:19 UTC, Imperatorn wrote: On Sunday, 21 March 2021 at 07:18:10 UTC, Jack Applegame wrote: Could someone please explain what is wrong with this code? https://glot.io/snippets/fwxn2198kv ```d import std.stdio; struct Sample{ void function() func1; void func

Re: Strange error

2021-03-21 Thread Imperatorn via Digitalmars-d-learn
On Sunday, 21 March 2021 at 07:18:10 UTC, Jack Applegame wrote: Could someone please explain what is wrong with this code? https://glot.io/snippets/fwxn2198kv ```d import std.stdio; struct Sample{ void function() func1; void function() func2; } void noth(Sample smpl)() { smpl.func1(); /

Strange error

2021-03-21 Thread Jack Applegame via Digitalmars-d-learn
Could someone please explain what is wrong with this code? https://glot.io/snippets/fwxn2198kv ```d import std.stdio; struct Sample{ void function() func1; void function() func2; } void noth(Sample smpl)() { smpl.func1(); // Error: expression __lambda1 is not a valid template value argu

Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/23/18 11:09 AM, Dgame wrote: It's really fun playing around: char[int.max - 1] c; results in Internal error: dmd/backend/cgcod.c 634 with DMD 2.079. Guess I or somebody else should report this. Yes, this is an ICE (Internal compiler error). Those should ALWAYS be reported. -Steve

Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Dgame via Digitalmars-d-learn
It's really fun playing around: char[int.max - 1] c; results in Internal error: dmd/backend/cgcod.c 634 with DMD 2.079. Guess I or somebody else should report this.

Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Dgame via Digitalmars-d-learn
On Monday, 23 April 2018 at 13:48:07 UTC, Steven Schveighoffer wrote: On 4/23/18 9:32 AM, Dgame wrote: char[-1] c; results in Error: char[18446744073709551615LU] size 1 * 18446744073709551615 exceeds 0x7fff size limit for static array Should we fix that? A negative index should be IMO

Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/23/18 9:32 AM, Dgame wrote: char[-1] c; results in Error: char[18446744073709551615LU] size 1 * 18446744073709551615 exceeds 0x7fff size limit for static array Should we fix that? A negative index should be IMO detected sooner/with a cleaner error message. Hm.. at least it's dete

Static Array with negative index results in a strange error-message

2018-04-23 Thread Dgame via Digitalmars-d-learn
char[-1] c; results in Error: char[18446744073709551615LU] size 1 * 18446744073709551615 exceeds 0x7fff size limit for static array Should we fix that? A negative index should be IMO detected sooner/with a cleaner error message.

Re: Strange error when compiling with dmd, not with ldc

2017-11-29 Thread user1234 via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 10:55:35 UTC, user1234 wrote: On Wednesday, 29 November 2017 at 06:18:09 UTC, Fra Mecca wrote: [...] You must also use a type constructor later, when a Configuration is declared: ``` immutable(Configuration) config; config.toString.writeln; // okay this tim

Re: Strange error when compiling with dmd, not with ldc

2017-11-29 Thread user1234 via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 06:18:09 UTC, Fra Mecca wrote: I have this struct: immutable struct Configuration { string title; string baseurl; string url; string email; string author; string parser; string target; string urlFormat; string urlFormatCmd;

Strange error when compiling with dmd, not with ldc

2017-11-28 Thread Fra Mecca via Digitalmars-d-learn
I have this struct: immutable struct Configuration { string title; string baseurl; string url; string email; string author; string parser; string target; string urlFormat; string urlFormatCmd; short port; string[] ignore; string[] extensions;

Re: Trying to pass lambda to function gives strange error

2016-06-11 Thread Incognito via Digitalmars-d-learn
On Saturday, 11 June 2016 at 22:58:00 UTC, Incognito wrote: function foo (double x, double y, bool function(bar) callback) is not callable using argument types (double, double, bool function() pure nothrow @nogc @safe function(bar w) pure nothrow @nogc @safe) I've tried with passing a delegate

Trying to pass lambda to function gives strange error

2016-06-11 Thread Incognito via Digitalmars-d-learn
function foo (double x, double y, bool function(bar) callback) is not callable using argument types (double, double, bool function() pure nothrow @nogc @safe function(bar w) pure nothrow @nogc @safe) I've tried with passing a delegate. I am calling it like foo(0,0, (bar b) => { return true; }

Re: alias overloading strange error

2015-08-01 Thread anonymous via Digitalmars-d-learn
On Friday, 31 July 2015 at 11:09:39 UTC, anonymous wrote: Definitely a bug. Please file an issue at . https://issues.dlang.org/show_bug.cgi?id=14858

Re: alias overloading strange error

2015-07-31 Thread anonymous via Digitalmars-d-learn
On Friday, 31 July 2015 at 10:56:33 UTC, vitus wrote: //Why expression 'foobar(1);' doesn't work? void foo()(){} void bar(int){} alias foobar = foo; alias foobar = bar; void main(){ .foobar(1); //OK foobar(1); //Error: overload alias 'foo' is not a var

Re: alias overloading strange error

2015-07-31 Thread simendsjo via Digitalmars-d-learn
On Friday, 31 July 2015 at 10:56:33 UTC, vitus wrote: //Why expression 'foobar(1);' doesn't work? void foo()(){} void bar(int){} alias foobar = foo; alias foobar = bar; void main(){ .foobar(1); //OK foobar(1); //Error: overload alias 'foo' is not a var

alias overloading strange error

2015-07-31 Thread vitus via Digitalmars-d-learn
//Why expression 'foobar(1);' doesn't work? void foo()(){} void bar(int){} alias foobar = foo; alias foobar = bar; void main(){ .foobar(1); //OK foobar(1); //Error: overload alias 'foo' is not a variable }

Re: strange error with std.net.curl

2014-05-07 Thread Mengu via Digitalmars-d-learn
On Sunday, 4 May 2014 at 16:40:08 UTC, Suliman wrote: I am trying to compile next code: import std.net.curl; import std.stdio; void main() { writeln(get("https://google.com/";)); } and got next error http://www.everfall.com/paste/id.php?y37dr6qmu54h this is related to verifying cert

strange error with std.net.curl

2014-05-04 Thread Suliman via Digitalmars-d-learn
I am trying to compile next code: import std.net.curl; import std.stdio; void main() { writeln(get("https://google.com/";)); } and got next error http://www.everfall.com/paste/id.php?y37dr6qmu54h

Re: Strange error

2013-11-15 Thread Temtaime
Go to bugzilla.

Strange error

2013-11-15 Thread Jack Applegame
This code (http://dpaste.dzfl.pl/4c499303) causes strange error description: class Bar had semantic errors when compiling On win32 it causes AV: Error: class Bar had semantic errors when compiling Assertion failure: '0' on line 1215 in file 'glue.c'

Re: Strange error

2013-07-04 Thread monarch_dodra
On Thursday, 4 July 2013 at 08:34:24 UTC, Temtaime wrote: Hello guys ! I'm found strange error when compiling following code: http://dpaste.1azy.net/b40ce9a4 The error is: src\phobos\std\stdio.d(1872): Error: variable _param_1 used before set Problem exists only when using following op

Strange error

2013-07-04 Thread Temtaime
Hello guys ! I'm found strange error when compiling following code: http://dpaste.1azy.net/b40ce9a4 The error is: src\phobos\std\stdio.d(1872): Error: variable _param_1 used before set Problem exists only when using following options: -inline -O I'm using DMD 2.063.2 on Windows. C

Re: Strange error when importing std.regex

2013-06-13 Thread Kenji Hara
On Wednesday, 12 June 2013 at 18:44:12 UTC, bearophile wrote: Dmitry Olshansky: There is no ambiguity, 1 is not a Regex object but it seems like template constraint in std.regex blows up. @Temtaime please file a bug on this. http://d.puremagic.com/issues/ std.algorithm.splitter(arr, 1); I

Re: Strange error when importing std.regex

2013-06-12 Thread bearophile
Dmitry Olshansky: There is no ambiguity, 1 is not a Regex object but it seems like template constraint in std.regex blows up. @Temtaime please file a bug on this. http://d.puremagic.com/issues/ std.algorithm.splitter(arr, 1); I think this bug already surfaced some time ago... Maybe it's al

Re: Strange error when importing std.regex

2013-06-12 Thread Dmitry Olshansky
12-Jun-2013 17:28, bearophile пишет: Temtaime: How i can avoid this? You have to qualify where the function comes from. One way to do it is to use: There is no ambiguity, 1 is not a Regex object but it seems like template constraint in std.regex blows up. @Temtaime please file a bug on

Re: Strange error when importing std.regex

2013-06-12 Thread Temtaime
Oh, thanks very much.

Re: Strange error when importing std.regex

2013-06-12 Thread bearophile
Temtaime: How i can avoid this? You have to qualify where the function comes from. One way to do it is to use: std.algorithm.splitter(arr, 1); Bye, bearophile

Strange error when importing std.regex

2013-06-12 Thread Temtaime
Hello guys! http://dpaste.1azy.net/9c4c3eb8 http://dpaste.1azy.net/afd8d20b How i can avoid this?