ghkweon / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

Instantiation of a static class #258

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Code:

Type 

 TObj = Class Static
 End;

TObj.Create; // OK
var o := TObj.Create; // Syntax Error: Class "TObj" is static, instantiation 
not allowed! [line: 7, column: 7]

Original issue reported on code.google.com by kazantse...@mail.ru on 3 May 2012 at 11:16

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1434.

Original comment by zar...@gmail.com on 3 May 2012 at 12:12

GoogleCodeExporter commented 8 years ago
Helpers still allow a non class-methods in static classes:

Type

 TObj = Class Static
 End;

Type

 TObjHelper = Helper For TObj

  Procedure Proc;
  Begin
  End;

 End;

Original comment by kazantse...@mail.ru on 3 May 2012 at 12:28