Changeset 371
- Timestamp:
- 02/05/10 22:53:22 (2 years ago)
- Files:
-
- branches/dmd-1.x/src/func.c (modified) (1 diff)
- trunk/src/func.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dmd-1.x/src/func.c
r366 r371 733 733 { VarDeclaration *v; 734 734 735 if (isFuncLiteralDeclaration() && isNested() )735 if (isFuncLiteralDeclaration() && isNested() && !sc->intypeof) 736 736 { 737 error(" literals cannot be class members");737 error("function literals cannot be class members"); 738 738 return; 739 739 } 740 740 else 741 741 { 742 assert(!isNested() ); // can't be both member and nested742 assert(!isNested() || sc->intypeof); // can't be both member and nested 743 743 assert(ad->handle); 744 744 v = new ThisDeclaration(loc, ad->handle); trunk/src/func.c
r366 r371 842 842 { VarDeclaration *v; 843 843 844 if (isFuncLiteralDeclaration() && isNested() )844 if (isFuncLiteralDeclaration() && isNested() && !sc->intypeof) 845 845 { 846 error(" literals cannot be class members");846 error("function literals cannot be class members"); 847 847 return; 848 848 } 849 849 else 850 850 { 851 assert(!isNested() ); // can't be both member and nested851 assert(!isNested() || sc->intypeof); // can't be both member and nested 852 852 assert(ad->handle); 853 853 Type *thandle = ad->handle;
