Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing up code formatting

Signed-off-by: Gleb Golubitsky <sectoid@gnolltech.org>
  • Loading branch information...
commit 9455e4754d3182a4fa00f0918c9b6b367e0c469f 1 parent 44ba810
@Sectoid Sectoid authored
Showing with 9 additions and 8 deletions.
  1. +4 −7 ncc/typing/StaticTyVar.n
  2. +5 −1 ncc/typing/TyVarEnv.n
View
11 ncc/typing/StaticTyVar.n
@@ -331,12 +331,9 @@ namespace Nemerle.Compiler
| _ => false
}
- def check_is_nullable(t) {
- match(t)
- {
- | FixedType.Class(ti, _) => ti.FullName != "System.ValueType" && t.CanBeNull
- | _ => t.CanBeNull;
- }
+ def checkIsNullable(t) {
+ | FixedType.Class(ti, _) => ti.FullName != "System.ValueType" && t.CanBeNull
+ | _ => t.CanBeNull
}
def check_constraints(t, c)
@@ -352,7 +349,7 @@ namespace Nemerle.Compiler
mutable ok = true;
when (SpecialConstraints %&& GenericParameterAttributes.NotNullableValueTypeConstraint
- && check_constraints(t, check_is_nullable))
+ && check_constraints(t, checkIsNullable))
{
// cs453
when (needMessage)
View
6 ncc/typing/TyVarEnv.n
@@ -554,7 +554,11 @@ namespace Nemerle.Compiler
match (c.ty)
{
| <[ @class ]> when c.IsSpecial => special |= GenericParameterAttributes.ReferenceTypeConstraint;
- | <[ @struct ]> when c.IsSpecial => { special |= (GenericParameterAttributes.NotNullableValueTypeConstraint | GenericParameterAttributes.DefaultConstructorConstraint); def ty = tenv.BindFixedType (env, currentType, <[ System.ValueType ]>, check_parms = false); subtype ::= ty; }
+ | <[ @struct ]> when c.IsSpecial =>
+ special |= GenericParameterAttributes.NotNullableValueTypeConstraint;
+ special |= GenericParameterAttributes.DefaultConstructorConstraint;
+ def ty = tenv.BindFixedType (env, currentType, <[ System.ValueType ]>, check_parms = false);
+ subtype ::= ty;
| <[ @new ]> when c.IsSpecial => special |= GenericParameterAttributes.DefaultConstructorConstraint;
| <[ @+ ]> when c.IsSpecial => special |= GenericParameterAttributes.Covariant;
| <[ @- ]> when c.IsSpecial => special |= GenericParameterAttributes.Contravariant;
Please sign in to comment.
Something went wrong with that request. Please try again.