diff options
author | dwagelaar | 2014-02-26 20:12:46 +0000 |
---|---|---|
committer | dwagelaar | 2014-02-26 20:12:46 +0000 |
commit | 5869a390735f5fbed2845edc9e738e8072e4d273 (patch) | |
tree | b7c411ba8493fedc976dd431f88e666995e839ca /plugins/org.eclipse.m2m.atl.emftvm | |
parent | fc128977d1924d932aeb6ed1eb1d15db13938a6e (diff) | |
download | org.eclipse.atl-5869a390735f5fbed2845edc9e738e8072e4d273.tar.gz org.eclipse.atl-5869a390735f5fbed2845edc9e738e8072e4d273.tar.xz org.eclipse.atl-5869a390735f5fbed2845edc9e738e8072e4d273.zip |
Improve error reporting at load time.
426154: rule inheritance and module import
https://bugs.eclipse.org/bugs/show_bug.cgi?id=426154
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.emftvm')
-rw-r--r-- | plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/impl/ExecEnvImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/impl/ExecEnvImpl.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/impl/ExecEnvImpl.java index 6efbfcbe..4111da5d 100644 --- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/impl/ExecEnvImpl.java +++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/impl/ExecEnvImpl.java @@ -1507,6 +1507,12 @@ public class ExecEnvImpl extends EObjectImpl implements ExecEnv { for (OutputRuleElement re : r.getOutputElements()) { resolveRuleElement(re); + if (!r.isAbstract()) { + EClassifier eType = re.getEType(); + if (eType instanceof EClass && ((EClass)eType).isAbstract()) { + throw new VMException(null, String.format("Non-abstract %s cannot have output elements of an abstract type: \"%s\"", r, re)); + } + } } for (Field field : r.getFields()) { |