wollok icon indicating copy to clipboard operation
wollok copied to clipboard

TS: Property polimórfica

Open PalumboN opened this issue 4 years ago • 0 comments

Ahora tenemos el siguiente test que no debería tener errores, pero los tiene:

		'''
			object obj1 { }
			object obj2 { }
			object testing {
				method test1() {
					obj.x(obj2)
				} 				
			}
			object obj { 
				var property x = obj1
			}
		'''.parseAndInfer.asserting [
			// FIXME
//			noIssues
			findByText('''obj2''').assertIncompatibleTypesIssue("obj1", "obj2")
		]

Hay que revisar por qué no infiere el tipo unión (puede ser con la lógica del sealed, tal vez las properties deberían esperar a resolver los open method relacionados).

PalumboN avatar May 08 '20 13:05 PalumboN