1203 – Cannot create Anonclass in loop

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1203 - Cannot create Anonclass in loop
Summary: Cannot create Anonclass in loop
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2007年04月30日 08:27 UTC by Frank Benoit
Modified: 2014年02月16日 15:22 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 Frank Benoit 2007年04月30日 08:27:14 UTC
class C {
 public this(){
 }
}
interface I {
 void fnc();
}
void main(){
 char[][] t;
 foreach( char[] c; t ){
 new class( c ) C, I {
 public this( char[] c ){
 super();
 }
 void fnc(){
 }
 };
 }
}
Error: constructor calls not allowed in loops or after labels
Comment 2 Walter Bright 2007年07月01日 13:59:44 UTC
Fixed DMD 1.018 and DMD 2.002


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