Skip to content

Permitir los objetos anónimos en el REPL #357

@fdodino

Description

@fdodino

Hoy me encontré con que este test en wollok-ts-cli está fallando

    it.skip('for reference to a literal object', () => {
      const result = interpreteLine(interpreter, 'object { } ')
      console.info(result)
      result.should.include('an Object#')
    })

porque el método export declare function interprete(interpreter: AbstractInterpreter, line: string, frame?: Frame, allowDefinitions?: boolean): ExecutionResult; si le pasás allowDefinition en false está chequeando

const definitions = parsedLine.filter(_ => is(Class)(_) || is(Singleton)(_) && !_.isClosure() || is(Mixin)(_)) as (Class | Singleton | Mixin)[]

hay que considerar el caso en el que el Singleton no tiene nombre, en cuyo caso sí debería permitirlo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions