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

TS: Property polimórfica #1891

Open
PalumboN opened this issue May 8, 2020 · 0 comments
Open

TS: Property polimórfica #1891

PalumboN opened this issue May 8, 2020 · 0 comments

Comments

@PalumboN
Copy link
Contributor

PalumboN commented May 8, 2020

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant