diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-11-10 22:18:07 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-11-10 22:18:07 +0100 |
commit | 5b5a3713e2436706f80e782ed26479b066205ab4 (patch) | |
tree | ad5c639c02f155c06c68d597caf64ec0b89459f8 /src/core/lombok/javac/JavacResolution.java | |
parent | 2bc8ad4dfd6e34e15f2bd7a661d62bc26cc13379 (diff) | |
download | lombok-5b5a3713e2436706f80e782ed26479b066205ab4.tar.gz lombok-5b5a3713e2436706f80e782ed26479b066205ab4.tar.bz2 lombok-5b5a3713e2436706f80e782ed26479b066205ab4.zip |
Fix for javac: 'val x = null;' is now valid, and results in x being of type Object.
Diffstat (limited to 'src/core/lombok/javac/JavacResolution.java')
-rw-r--r-- | src/core/lombok/javac/JavacResolution.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java index e0eb436d..2845328d 100644 --- a/src/core/lombok/javac/JavacResolution.java +++ b/src/core/lombok/javac/JavacResolution.java @@ -325,6 +325,8 @@ public class JavacResolution { // NB: There's such a thing as maker.Type(type), but this doesn't work very well; it screws up anonymous classes, captures, and adds an extra prefix dot for some reason too. // -- so we write our own take on that here. + if (type.tag == TypeTags.BOT) return createJavaLangObject(maker, ast); + if (type.isPrimitive()) return primitiveToJCTree(type.getKind(), maker); if (type.isErroneous()) throw new TypeNotConvertibleException("Type cannot be resolved"); |