Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

assertThateException -> ExceptionAssert can't handle member exception classes #729

Open
Voiteh opened this issue Aug 4, 2019 · 0 comments

Comments

@Voiteh
Copy link

Voiteh commented Aug 4, 2019

When passing MemberClass reference to ExceptionAssert.hasType It fails to compile as typeCondition requires Class<Throwable,Nothing>|Boolean(ClassModel<Throwable,Nothing>) The first union case should be ClassModel<Throwable,Nothing>

Example:

mport ceylon.test {

	test,
	assertThatException
}
class Outer{
	static class Inner() extends Exception(){}
	shared new(){}
	shared void functionWhichThrows(){
		throw Inner();
	}
}


shared test void shouldCompile(){
	assertThatException(()=> Outer().functionWhichThrows()).hasType(`Outer.Inner`);
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant