Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypesAttributeAs expectation not properly working #327

Closed
julian-berbel opened this issue Jan 29, 2021 · 4 comments
Closed

TypesAttributeAs expectation not properly working #327

julian-berbel opened this issue Jan 29, 2021 · 4 comments

Comments

@julian-berbel
Copy link
Member

In exercise https://mumuki.io/staging/exercises/3720-objetos-con-tipado-estatico-practica-colecciones-permiso-yo-entre-primero

The following solution:

class Panaderia {
  LinkedList<Cliente> cola = new LinkedList();
  
  public void entrar(Cliente unCliente){
    cola.offer(unCliente);
  }
  
  public LinkedList<Cliente> enEspera(){
    return cola;
  }
  
  public void atender(){
    cola.poll();
  }
  
}

Should pass with failed expectation * TypesAttributeAs:Queue but said expectation is not currently failing.

@flbulgarelli
Copy link
Member

First insight: the Type is there, so there are no parsing issues

image

@flbulgarelli
Copy link
Member

Actually there is no issue 🎉 Inspection TypesAttributeAs does not exist. It is not referenced in code nor in documentation.

However there is a TypesAs inspection, which works as expected:

[53] pry(main)> Mulang::Code.native('Java', s).expect "*", "TypesAs:Queue"
=> false
[54] pry(main)> 
[55] pry(main)> Mulang::Code.native('Java', s).expect "*", "TypesAs:LinkedList"
=> true

So that looks just like a content error @Gustrucco

@julian-berbel
Copy link
Member Author

Then I should add that this other exercise is using that expectation too: https://mumuki.io/staging/exercises/3802-objetos-con-tipado-estatico-colecciones-podes-cambiar-pero-no-redimensionarte

@flbulgarelli
Copy link
Member

Duplicate of #206

@flbulgarelli flbulgarelli marked this as a duplicate of #206 Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants