close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 15 years ago

Closed 15 years ago

#725 closed defect (fixed)

Fail creating class instances with functions taking just one argument of type NameBlock

Reported by: Víctor de Buen Remiro Owned by: Víctor de Buen Remiro
Priority: highest Milestone: OOP Implementation
Component: OOP Version: 2.0.1
Severity: blocker Keywords:
Cc:

Description (last modified by Víctor de Buen Remiro)

When we try to create an instance of a class by means of a function taking just one argument of type NameBlock TOL shows an stupid error and doesn't creates it.

  Class ClassA 
  {
    Text _.name;
    Real _.length
  };

  ClassA ClassA.New(NameBlock args)
  {
    ClassA a = [[
      Text _.name   = args::name,
      Real _.length = TextLength(args::name)
    ]]
  };

  ClassA a = 
  {
    NameBlock args = [[Text name="lkshfli"]];
    ClassA.New(aux)
  };

  ClassA b = ClassA.New({args=[[Text name="lkshfli"]]});

  ClassA c = ClassA.New([[Text name="lkshfli"]]);

Instances ClassA a and ClassA b are created but ClassA c is not created.

Change History (4)

comment:1 Changed 15 years ago by Víctor de Buen Remiro

Description: modified (diff)
Status: newassigned

comment:2 Changed 15 years ago by Víctor de Buen Remiro

Description: modified (diff)

comment:3 Changed 15 years ago by Víctor de Buen Remiro

Description: modified (diff)

comment:4 Changed 15 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: assignedclosed

(In [1235]) Fixed #725

Note: See TracTickets for help on using tickets.