Skip to content

Commit

Permalink
Merge pull request #10 from PetervB/master
Browse files Browse the repository at this point in the history
Fixed annotation for ClassType
  • Loading branch information
Guido Wachsmuth authored and Guido Wachsmuth committed Nov 19, 2014
2 parents 03533ad + a6a20b2 commit fa8437c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion milestone2-analysis/day7.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ and a variable reference to be of its declared type `Bool()`:

You can use `setup` headers and footers to avoid repeating parts in similar test cases.

When using get-type on objects the expected ClassType constructor also requires annotations.
These annotations should be added to the constructor using a wild card as done below.

test expression id type [[
class Foobar {
Foo x;
public Foo method() {
return [[x]];
}
}
]] run get-type to ClassType("Foo"{_})

You should come up with test cases for the types of all kinds of expressions.
Just like previous testing assignments, this assignment is all about the coverage of your test suite.

Expand All @@ -116,7 +128,7 @@ Consider the following test case as an example:
]] resolve #1 to #2

The type of the callee expression determines the class in which the method declaration can be found.
In this example, the expression `new Foo()` is of type `ClassType("Foo")` and
In this example, the expression `new Foo()` is of type `ClassType("Foo"{_})` and
the corresponding class `Foo` contains a method declaration for `run()`.

You should come up with test cases for the resolution of method names.
Expand Down

0 comments on commit fa8437c

Please sign in to comment.