comparison dmd/ThrowStatement.d @ 72:2e2a5c3f943a

reduced warnings by adding override to the methods think this also normalizes different line endings used all over the place
author Trass3r
date Sat, 28 Aug 2010 16:19:48 +0200
parents a8b50ff7f201
children e28b18c23469
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
27 { 27 {
28 super(loc); 28 super(loc);
29 this.exp = exp; 29 this.exp = exp;
30 } 30 }
31 31
32 Statement syntaxCopy() 32 override Statement syntaxCopy()
33 { 33 {
34 ThrowStatement s = new ThrowStatement(loc, exp.syntaxCopy()); 34 ThrowStatement s = new ThrowStatement(loc, exp.syntaxCopy());
35 return s; 35 return s;
36 } 36 }
37 37
38 Statement semantic(Scope sc) 38 override Statement semantic(Scope sc)
39 { 39 {
40 //printf("ThrowStatement::semantic()\n"); 40 //printf("ThrowStatement::semantic()\n");
41 41
42 FuncDeclaration fd = sc.parent.isFuncDeclaration(); 42 FuncDeclaration fd = sc.parent.isFuncDeclaration();
43 fd.hasReturnExp |= 2; 43 fd.hasReturnExp |= 2;
49 if (!exp.type.toBasetype().isClassHandle()) 49 if (!exp.type.toBasetype().isClassHandle())
50 error("can only throw class objects, not type %s", exp.type.toChars()); 50 error("can only throw class objects, not type %s", exp.type.toChars());
51 return this; 51 return this;
52 } 52 }
53 53
54 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 54 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
55 { 55 {
56 assert(false); 56 assert(false);
57 } 57 }
58 58
59 BE blockExit() 59 override BE blockExit()
60 { 60 {
61 return BE.BEthrow; // obviously 61 return BE.BEthrow; // obviously
62 } 62 }
63 63
64 Statement inlineScan(InlineScanState* iss) 64 override Statement inlineScan(InlineScanState* iss)
65 { 65 {
66 if (exp) 66 if (exp)
67 exp = exp.inlineScan(iss); 67 exp = exp.inlineScan(iss);
68 return this; 68 return this;
69 } 69 }
70 70
71 void toIR(IRState* irs) 71 override void toIR(IRState* irs)
72 { 72 {
73 // throw(exp) 73 // throw(exp)
74 74
75 Blockx *blx = irs.blx; 75 Blockx *blx = irs.blx;
76 76