Internal error when trying to create `NSLayoutConstraint` instance

(wdb) #1

IDE: Fire
Version: Version 10.0.0.2398 (develop) built on bajor, 20190424-095707. Commit b865645.
Target (If relevant): _iOS
Description:
I am trying to instantiate an instance of NSLayouConstraint using the following code but this causes the list error:

dynamicConstraints += NSLayoutConstraint.constraints(visualFormat: "H:|-[titleLabel]-[textField]-|", options: [], metrics: nil, views: views)

the error occurring:

E:                   Internal error: System.NullReferenceException: Object reference not set to an instance of an object
  at RemObjects.Oxygene.Code.Compiler.Compiler.CheckAndMakeCompatible (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Expression value, RemObjects.Oxygene.Code.BaseType inputType, RemObjects.Oxygene.Code.BaseType targetType, System.Boolean aUnwrapNullable) [0x01965] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.CallExpressionTransform.ValidateParameterTypes (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, System.Collections.Generic.List`1[T] val, RemObjects.Oxygene.Code.IMethodInfo aMethod, RemObjects.Oxygene.Code.BaseType aSelfType, System.Collections.Generic.IList`1[T] aGP, System.Int32[] aOffsets, System.Int32 aRegularCount) [0x00511] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.CallExpressionTransform.FinishCall (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.MutableCallExpression call, RemObjects.Oxygene.Code.CallMode aMode) [0x00994] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.CallExpressionTransform.ResolveExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.CallExpression incall, RemObjects.Oxygene.Code.CallMode aCM) [0x05a21] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Expression element) [0x006ae] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.AssignmentExpressionTransform.ResolveExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.AssignmentExpression melement) [0x01bbc] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Expression element) [0x00975] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.SilverBinaryExpressionTransform.ResolveExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.SilverBinaryExpression element) [0x003af] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitExpression (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Expression element) [0x00b4b] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.AssignmentStatementTransform.ResolveStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.AssignmentStatement assignmentStatement) [0x0038d] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Statement element) [0x003f7] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.BeginStatementTransform.ResolveStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.BeginStatement beginStatement) [0x00204] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Statement element) [0x00421] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.IfStatementTransform.ResolveStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.IfStatement ifStatement) [0x0041c] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Statement element) [0x003a3] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.BeginStatementTransform.ResolveStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.BeginStatement beginStatement) [0x00204] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Statement element) [0x00421] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.IfStatementTransform.ResolveStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.IfStatement ifStatement) [0x0043e] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Statement element) [0x003a3] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.BeginStatementTransform.ResolveStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.BeginStatement beginStatement) [0x00204] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.NewResolveExpressionAndStatement.VisitStatement (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.Statement element) [0x00421] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.Compiler.ResolveMethodBody (RemObjects.Oxygene.Code.Compiler.ScopeInfo aScope, RemObjects.Oxygene.Code.IMethodImplementation aMethod) [0x01934] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.Compiler+<>c__DisplayClass49.<ResolveMembers>b__5 (RemObjects.Oxygene.Code.IParsedType aType) [0x00105] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.Compiler.ForAllInternalTypes (System.Action`1[T] aAt) [0x0007b] in <cd1334f8ea24434abd27aef9debae02d>:0 
  at RemObjects.Oxygene.Code.Compiler.Compiler.ResolveMembers () [0x001f5] in <cd1334f8ea24434abd27aef9debae02d>:0  [/Users/x/Development/Projects/x/x/version-3/config-app/x/Views/TextFieldCell.swift (86)]

Expected Behavior:
I would expect that this line of code would compile

Actual Behavior:
Internal error occurs within the Silver compiler

(wdb) #2

I have shared the project privately

(RemObjects) #3

Thanks, logged as bugs://82454

(RemObjects) #5

bugs://82454 got closed with status fixed.

(wdb) #6

I can confirm that I can now compile this code now :slight_smile: