mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-20 04:23:33 +00:00
If val errors out, now at least you see where it happened.
This commit is contained in:
1 parent
9bc421ecdc
commit
7ada401b6d
2 files changed
+7
-2
No files matched your search
@@ -7,6 +7,6 @@
|
||||
<ibiblio name="maven-repo2" m2compatible="true" root="http://repo2.maven.org/maven2" />
|
||||
</chain>
|
||||
</resolvers>
|
||||
<settings defaultResolver="projectRepos" />
|
||||
<settings defaultResolver="projectRepos" validate="false" />
|
||||
<caches defaultCacheDir="${ivy.basedir}/ivyCache" />
|
||||
</ivysettings>
|
||||
@@ -95,7 +95,12 @@ public class HandleVal extends JavacASTAdapter {
|
||||
if (rhsOfEnhancedForLoop == null) {
|
||||
if (local.init.type == null) {
|
||||
JavacResolution resolver = new JavacResolution(localNode.getContext());
|
||||
type = ((JCExpression) resolver.resolveMethodMember(localNode).get(local.init)).type;
|
||||
try {
|
||||
type = ((JCExpression) resolver.resolveMethodMember(localNode).get(local.init)).type;
|
||||
} catch (RuntimeException e) {
|
||||
System.err.println("Exception while resolving: " + localNode);
|
||||
throw e;
|
||||
}
|
||||
} else {
|
||||
type = local.init.type;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user