From 96cd0d1ae244a9a3ddae50cc3ffee6bb7abbd355 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 4 Jul 2011 14:34:04 +0400 Subject: [PATCH] Small fix in nullablilty handling --- grammar/src/notation.grm | 4 ++-- stdlib/src/jet/typeinfo/TypeInfo.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grammar/src/notation.grm b/grammar/src/notation.grm index 94e4316bc21..dc684f42daf 100644 --- a/grammar/src/notation.grm +++ b/grammar/src/notation.grm @@ -21,8 +21,8 @@ alpha{color:blue}*{*{color}beta{color:blue}*}*{color} denotes a nonempty _beta_- h1. Semicolons -*Up* provides "semicolon inference": syntactically, subsentences (e.g., statements, declarations etc) are separated by +[Up] provides "semicolon inference": syntactically, subsentences (e.g., statements, declarations etc) are separated by the pseudo-token [SEMI|#SEMI], which stands for "semicolon or newline". In most cases, there's no need for semicolons in -*Up* code. +[Up] code. */ diff --git a/stdlib/src/jet/typeinfo/TypeInfo.java b/stdlib/src/jet/typeinfo/TypeInfo.java index 3ef38ffc45f..50c5dddff3d 100644 --- a/stdlib/src/jet/typeinfo/TypeInfo.java +++ b/stdlib/src/jet/typeinfo/TypeInfo.java @@ -37,7 +37,7 @@ public class TypeInfo implements JetObject { if (!theClass.isAssignableFrom(other.theClass)) { return false; } - if (nullable != other.nullable) { + if (nullable && !other.nullable) { return false; } if (typeParameters != null) {