Mercurial > projects > ddmd
comparison dmd/ClassDeclaration.d @ 87:b17640f0e4e8
Fixed a bug with a Scope.this(Scope enclosing) being called instead of Scope.clone() method (as a copy ctor replacement)
author | korDen |
---|---|
date | Mon, 30 Aug 2010 19:56:27 +0400 |
parents | 43073c7c7769 |
children | 23280d154c5b |
comparison
equal
deleted
inserted
replaced
83:ee670dd808a8 | 87:b17640f0e4e8 |
---|---|
439 { | 439 { |
440 //printf("%s: forward reference of base class %s\n", toChars(), tc.sym.toChars()); | 440 //printf("%s: forward reference of base class %s\n", toChars(), tc.sym.toChars()); |
441 //error("forward reference of base class %s", baseClass.toChars()); | 441 //error("forward reference of base class %s", baseClass.toChars()); |
442 // Forward reference of base class, try again later | 442 // Forward reference of base class, try again later |
443 //printf("\ttry later, forward reference of base class %s\n", tc.sym.toChars()); | 443 //printf("\ttry later, forward reference of base class %s\n", tc.sym.toChars()); |
444 scope_ = scx ? scx : new Scope(sc); | 444 scope_ = scx ? scx : sc.clone(); |
445 scope_.setNoFree(); | 445 scope_.setNoFree(); |
446 if (tc.sym.scope_) | 446 if (tc.sym.scope_) |
447 tc.sym.scope_.module_.addDeferredSemantic(tc.sym); | 447 tc.sym.scope_.module_.addDeferredSemantic(tc.sym); |
448 scope_.module_.addDeferredSemantic(this); | 448 scope_.module_.addDeferredSemantic(this); |
449 return; | 449 return; |
508 if (!b.base.symtab || b.base.scope_) | 508 if (!b.base.symtab || b.base.scope_) |
509 { | 509 { |
510 //error("forward reference of base class %s", baseClass.toChars()); | 510 //error("forward reference of base class %s", baseClass.toChars()); |
511 // Forward reference of base, try again later | 511 // Forward reference of base, try again later |
512 //printf("\ttry later, forward reference of base %s\n", baseClass.toChars()); | 512 //printf("\ttry later, forward reference of base %s\n", baseClass.toChars()); |
513 scope_ = scx ? scx : new Scope(sc); | 513 scope_ = scx ? scx : sc.clone(); |
514 scope_.setNoFree(); | 514 scope_.setNoFree(); |
515 if (tc.sym.scope_) | 515 if (tc.sym.scope_) |
516 tc.sym.scope_.module_.addDeferredSemantic(tc.sym); | 516 tc.sym.scope_.module_.addDeferredSemantic(tc.sym); |
517 scope_.module_.addDeferredSemantic(this); | 517 scope_.module_.addDeferredSemantic(this); |
518 return; | 518 return; |
703 alignsize = 0; | 703 alignsize = 0; |
704 structalign = 0; | 704 structalign = 0; |
705 | 705 |
706 sc = sc.pop(); | 706 sc = sc.pop(); |
707 | 707 |
708 scope_ = scx ? scx : new Scope(sc); | 708 scope_ = scx ? scx : sc.clone(); |
709 scope_.setNoFree(); | 709 scope_.setNoFree(); |
710 scope_.module_.addDeferredSemantic(this); | 710 scope_.module_.addDeferredSemantic(this); |
711 | 711 |
712 //printf("\tsemantic('%s') failed due to forward references\n", toChars()); | 712 //printf("\tsemantic('%s') failed due to forward references\n", toChars()); |
713 return; | 713 return; |