Bug 8735 – ICE: Assertion failure: 't' on line 100 in file 'aliasthis.c'

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-28T20:34:00Z
Last change time
2017-07-19T06:21:10Z
Keywords
ice, pull
Assigned to
nobody
Creator
andrej.mitrovich
See also
https://d.puremagic.com/issues/show_bug.cgi?id=11517, https://issues.dlang.org/show_bug.cgi?id=11517

Comments

Comment #0 by andrej.mitrovich — 2012-09-28T20:34:23Z
Two bugs. First bug: struct Foo { int test(string op)() { return 0; } alias test!"*" this; } test.d(15): Error: no identifier for declarator test!("*") test.d(15): Error: semicolon expected to close alias declaration Second bug: struct Foo { int test(string op)() { return 0; } alias test!"*" getVar; alias getVar this; } Assertion failure: 't' on line 100 in file 'aliasthis.c' I think both should work because this works ok: struct Foo { int test(string op)() { return 0; } auto getVar() { return test!"*"(); } alias getVar this; }
Comment #1 by monarchdodra — 2013-03-13T09:11:26Z
Stumbled upon this, with (I think) a simple reduced case: //---- struct S(alias Arg) { alias Arg Val; alias Val this; } alias S!1 S1; //---- Assertion failure: 't' on line 100 in file 'aliasthis.c' abnormal program termination The code is not legal (AFAIK), but ICE none the less.
Comment #2 by zheny — 2013-03-13T10:42:07Z
*** Issue 9709 has been marked as a duplicate of this issue. ***
Comment #3 by bugzilla — 2013-10-06T23:48:09Z
(In reply to comment #0) > Two bugs. Please, one bug report per bugzilla issue.
Comment #4 by andrej.mitrovich — 2013-10-07T07:43:23Z
(In reply to comment #3) > (In reply to comment #0) > > Two bugs. > > Please, one bug report per bugzilla issue. Yes, but these are highly related to each other.
Comment #5 by bugzilla — 2013-10-07T12:48:09Z
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #0) > > > Two bugs. > > > > Please, one bug report per bugzilla issue. > > Yes, but these are highly related to each other. Yes, you can link one bugzilla report to another. Things that require DIFFERENT fixes need to be in SEPARATE issues. Otherwise, it's just miserable and confusing from numerous standpoints. It's not like we're going to overflow the bugzilla issue number counter, nor are we getting billed per issue number.
Comment #6 by k.hara.pg — 2013-11-13T23:01:59Z
(In reply to comment #0) > Two bugs. First bug: > > struct Foo > { > int test(string op)() { return 0; } > alias test!"*" this; > } > > test.d(15): Error: no identifier for declarator test!("*") > test.d(15): Error: semicolon expected to close alias declaration This is not a bug. AliasThisDeclaration only accepts an "Identifier" as the forwarding target. http://dlang.org/declaration AliasThisDeclaration: alias Identifier this So it is invalid bug, or may be filed as an enhancement separately.
Comment #7 by k.hara.pg — 2013-11-14T03:57:58Z
Comment #8 by k.hara.pg — 2013-11-14T03:58:11Z
*** Issue 11502 has been marked as a duplicate of this issue. ***
Comment #9 by github-bugzilla — 2013-11-14T09:52:58Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/50ddf47976a864dec87e7b688e9ece0425720fad fix Issue 8735 - ICE: Assertion failure: 't' on line 100 in file 'aliasthis.c' https://github.com/D-Programming-Language/dmd/commit/569908d3cc51ebf07260811929add6dcb79fef3e Merge pull request #2762 from 9rnsr/fix8735 Issue 8735 - ICE: Assertion failure: 't' on line 100 in file 'aliasthis.c'
Comment #10 by andrej.mitrovich — 2013-11-14T10:29:55Z
(In reply to comment #6) > This is not a bug. AliasThisDeclaration only accepts an "Identifier" as the > forwarding target. > > http://dlang.org/declaration > AliasThisDeclaration: > alias Identifier this > > So it is invalid bug, or may be filed as an enhancement separately. That's an unnecessary limitation. If you can do: alias test!"*" x; alias x this; Then you should be able to do the same in one line.
Comment #11 by k.hara.pg — 2013-11-14T10:35:50Z
(In reply to comment #10) > That's an unnecessary limitation. If you can do: > > alias test!"*" x; > alias x this; > > Then you should be able to do the same in one line. Just I want to say is, mixing enhancement and ice bug report is really bad.
Comment #12 by monarchdodra — 2013-11-14T12:45:50Z
(In reply to comment #11) > Just I want to say is, mixing enhancement and ice bug report is really bad. I had not realized the original code was not actually valid according to spec. I filed a dedicated ER: https://d.puremagic.com/issues/show_bug.cgi?id=11517
Comment #13 by k.hara.pg — 2013-12-22T18:52:09Z
*** Issue 11804 has been marked as a duplicate of this issue. ***