anchor.diff:                      | ShapeVarUnchecked v -> Expr.Var v
                       | ShapeLambdaUnchecked(v, body) -> Expr.Lambda(v, check body)
   
  -                check exprT
  +                match methodBaseT with
  +                | :? ProvidedMethod as m when (match methodBaseT.DeclaringType with :? ProvidedTypeDefinition as pt -> pt.IsErased | _ -> true) ->
  +                    let exprFunT = m.GetInvokeCodeInternal(false) 
  +                    let exprT = exprFunT parametersT
  +                    check exprT
  +
  +                | :? ProvidedConstructor as m when (match methodBaseT.DeclaringType with :? ProvidedTypeDefinition as pt -> pt.IsErased | _ -> true) ->
  +                    let exprFunT = m.GetInvokeCodeInternal(false)
  +                    let exprT = exprFunT parametersT
  +                    check exprT
  +
  +                // Otherwise, assume this is a generative assembly and just emit a call to the constructor or method
  +                | :?  ConstructorInfo as cinfoT ->
  +                    Expr.NewObjectUnchecked(cinfoT, Array.toList parametersT)
  +
  +                | :? MethodInfo as minfoT ->
  +                    if minfoT.IsStatic then
  +                        Expr.CallUnchecked(minfoT, Array.toList parametersT)
  +                    else
  +                        Expr.CallUnchecked(parametersT.[0], minfoT, Array.toList parametersT.[1..])
  +
  +                | _ -> failwith ("TypeProviderForNamespaces.GetInvokerExpression: not a ProvidedMethod/ProvidedConstructor/ConstructorInfo/MethodInfo, name=" + methodBaseT.Name + " class=" + methodBaseT.GetType().FullName)
   
               member __.GetStaticParameters(ty) =
                   match ty with
  
positive.code:       | Type of Type
        | TypeToBeDecided
  
      type ProvidedTypeDefinition(isTgt: bool, container:TypeContainer, className: string, baseType: (unit -> Type option), attributes: TypeAttributes, getEnumUnderlyingType, staticParams, staticParamsApply, initialData, customAttributesData, nonNullable, hideObjectMethods) as this =
          inherit TypeDelegator()
  
          static let defaultAttributes isErased = 
  
negative.code:         let addTypes (providedTypeDefinitions:ProvidedTypeDefinition list, enclosingTypeNames: string list option) =
              for pt in providedTypeDefinitions do
                  if pt.IsErased then failwith ("The provided type "+pt.Name+"is marked as erased and cannot be converted to a generated type. Set 'IsErased=false' on the ProvidedTypeDefinition")
                  if pt.IsTarget then failwithf "Expected '%O' to be a source ProvidedTypeDefinition. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" pt
                  if not (Object.ReferenceEquals(this, pt.Assembly)) then failwithf "Mismached assemblies for a ProvidedTypeDefinition - you are adding the type '%O' to assembly '%O' but it was already given assembly '%O' as its assembly when it was created. These should match." pt assemblyName.Name (pt.Assembly.GetName().Name)
                  theTypes.Add (pt, enclosingTypeNames)
                  pt.SetAssemblyInternal (this :> Assembly)
  
  