872 – Assertion in expression.c caused by taking typeof of "this.outer" in nested classes.

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 872 - Assertion in expression.c caused by taking typeof of "this.outer" in nested classes.
Summary: Assertion in expression.c caused by taking typeof of "this.outer" in nested c...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
Reported: 2007年01月22日 18:05 UTC by Tyler Knott
Modified: 2014年02月15日 13:13 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Tyler Knott 2007年01月22日 18:05:40 UTC
Comment 1 Tyler Knott 2007年01月22日 18:11:22 UTC
Sorry, I accidentally hit "enter" before providing a description. Anyways, the following example (which seems to be valid D code) will cause an assertion in the DMD frontend code (Assertion failure: 'global.errors || var' on line 1904 in file 'expression.c') upon compilation. This bug affects both DMD and GDC.
Test case:
class ExOuter
{
	class ExInner
	{
		this() { typeof(this.outer) X; }
	}
}
void main() {}
Comment 3 Walter Bright 2007年02月12日 03:40:11 UTC
Fixed DMD 1.005


AltStyle によって変換されたページ (->オリジナル) /