Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pieter Koopman
Personal Prof public repository
Commits
c38c71e6
Commit
c38c71e6
authored
Oct 08, 2019
by
Markus Klinik
Browse files
Assignment03Rules: small refactoring
parent
6196c114
Changes
1
Hide whitespace changes
Inline
Side-by-side
java-feedback-rascal/src/Assignment03Rules.rsc
View file @
c38c71e6
...
...
@@ -51,14 +51,12 @@ set[Message] a03_shapes_implement_comparable(M3 model)
return { error("There should be two implementations of Geometric: Rectangle and Circle", geometric) };
}
// Rectangle and Circle should only implement Geometric and nothing else
result += union(
{ model.implements[shape] == { geometric }
? {}
: { error("<getName(model,shape)> should implement Geometric and nothing else", shape) }
result +=
{ error("<getName(model,shape)> should implement Geometric and nothing else", shape)
| shape <- shapes
});
, model.implements[shape] != { geometric }
};
// Rectangle and Circle should implement Comparable.compareTo
loc compareTo = |java+method:///java/lang/Comparable/compareTo(T)|;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment