### Test Failure
Test Failed at ./runtests.jl:11 Expression: Queen(8, 4) Expected: ExercismTestReports.InvalidPosition No exception thrown
it seems I'm doing something sligthly different
or should the exception be thrown when creating the queen-structs??
thanks for your answers in advance,
Nisang
Given 1, 2, and 3, it seems we’re not dispatching to your constructor. Otherwise, x > 7 would be true and we would have thrown your InvalidPosition. So how is the struct being created?
As to your other questions, the test runner output is telling you it evaluated Queen(8, 4) on line 11 where it expected ExercismTestReports.InvalidPosition but got something else. Specifically, no error was raised where one was expected.
It’s notable that it’s calling Queen(8, 4) and expecting an error in the process. It’s not calling canattack() unless you call it yourself while Queen() is being evaluated so you can set that aside unless you are calling that function.
As a practice exercise, it’s not specifically about multiple dispatch unless you make it part of your solution.
To rephrase my earlier question which will cut to the heart of the issue I promise, where in your code does Queen(8, 4) run? Does it run in that constructor function?
thanks for your answer,
I have to admit that I don’t really understand your question.
Do you mean where to (which is called by the compiler the function or the struct)?
I just solved it! …
Believing I used multiple dispatch and then
talked to my Julia friend
who said Queen() is a constructor function.
and with this it would be solveable very easily!
and also
letting me realize I have not noticed so far that is an own concept…
which is not part of the syllabus!?
I don’t know if I’d published my final code if that would spoil the solution to students following…?
That’s good. I’d strongly recommend you make a mentoring request and go over your solution with a mentor to make sure any issues are fully addressed. There was a bit more going on here than we addressed, but it’s great that you’re unstuck.