Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main to release/dev16.9 #10265

Merged
merged 1 commit into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fsharp/ConstraintSolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1682,12 +1682,12 @@ and MemberConstraintSolutionOfMethInfo css m minfo minst =
// This is important for calls to operators on generated provided types. There is an (unchecked) condition
// that generative providers do not re=order arguments or insert any more information into operator calls.
match callMethInfoOpt, callExpr with
| Some methInfo, Expr.Op (TOp.ILCall (_useCallVirt, _isProtected, _, _isNewObj, NormalValUse, _isProp, _noTailCall, ilMethRef, _actualTypeInst, actualMethInst, _ilReturnTys), [], args, m)
| Some methInfo, Expr.Op (TOp.ILCall (_, _, _, _, NormalValUse, _, _, ilMethRef, _, methInst, _), [], args, m)
when (args, (objArgVars@allArgVars)) ||> List.lengthsEqAndForall2 (fun a b -> match a with Expr.Val (v, _, _) -> valEq v.Deref b | _ -> false) ->
let declaringType = Import.ImportProvidedType amap m (methInfo.PApply((fun x -> x.DeclaringType), m))
if isILAppTy g declaringType then
let extOpt = None // EXTENSION METHODS FROM TYPE PROVIDERS: for extension methods coming from the type providers we would have something here.
ILMethSln(declaringType, extOpt, ilMethRef, actualMethInst)
ILMethSln(declaringType, extOpt, ilMethRef, methInst)
else
closedExprSln
| _ ->
Expand Down
12 changes: 6 additions & 6 deletions src/fsharp/FindUnsolved.fs
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ and accOp cenv env (op, tyargs, args, _m) =
accExprs cenv env args
match op with
// Handle these as special cases since mutables are allowed inside their bodies
| TOp.ILCall (_, _, _, _, _, _, _, _, enclTypeArgs, methTypeArgs, tys) ->
accTypeInst cenv env enclTypeArgs
accTypeInst cenv env methTypeArgs
accTypeInst cenv env tys
| TOp.ILCall (_, _, _, _, _, _, _, _, enclTypeInst, methInst, retTypes) ->
accTypeInst cenv env enclTypeInst
accTypeInst cenv env methInst
accTypeInst cenv env retTypes
| TOp.TraitCall traitInfo ->
accTraitInfo cenv env traitInfo

| TOp.ILAsm (_, tys) ->
accTypeInst cenv env tys
| TOp.ILAsm (_, retTypes) ->
accTypeInst cenv env retTypes
| _ -> ()

and accTraitInfo cenv env (TTrait(tys, _nm, _, argtys, rty, _sln)) =
Expand Down
14 changes: 7 additions & 7 deletions src/fsharp/IlxGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2367,8 +2367,8 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel =
GenSetStaticField cenv cgbuf eenv (f, tyargs, e2, m) sequel
| TOp.Tuple tupInfo, _, _ ->
GenAllocTuple cenv cgbuf eenv (tupInfo, args, tyargs, m) sequel
| TOp.ILAsm (code, returnTys), _, _ ->
GenAsmCode cenv cgbuf eenv (code, tyargs, args, returnTys, m) sequel
| TOp.ILAsm (instrs, retTypes), _, _ ->
GenAsmCode cenv cgbuf eenv (instrs, tyargs, args, retTypes, m) sequel
| TOp.While (sp, _), [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _)], [] ->
GenWhileLoop cenv cgbuf eenv (sp, e1, e2, m) sequel
| TOp.For (spStart, dir), [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [v], e3, _, _)], [] ->
Expand All @@ -2377,8 +2377,8 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel =
GenTryFinally cenv cgbuf eenv (e1, e2, m, resty, spTry, spFinally) sequel
| TOp.TryWith (spTry, spWith), [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [vf], ef, _, _);Expr.Lambda (_, _, _, [vh], eh, _, _)], [resty] ->
GenTryWith cenv cgbuf eenv (e1, vf, ef, vh, eh, m, resty, spTry, spWith) sequel
| TOp.ILCall (virt, _, valu, newobj, valUseFlags, _, isDllImport, ilMethRef, enclArgTys, methArgTys, returnTys), args, [] ->
GenILCall cenv cgbuf eenv (virt, valu, newobj, valUseFlags, isDllImport, ilMethRef, enclArgTys, methArgTys, args, returnTys, m) sequel
| TOp.ILCall (isVirtual, _, isStruct, isCtor, valUseFlag, _, noTailCall, ilMethRef, enclTypeInst, methInst, returnTypes), args, [] ->
GenILCall cenv cgbuf eenv (isVirtual, isStruct, isCtor, valUseFlag, noTailCall, ilMethRef, enclTypeInst, methInst, args, returnTypes, m) sequel
| TOp.RefAddrGet _readonly, [e], [ty] -> GenGetAddrOfRefCellField cenv cgbuf eenv (e, ty, m) sequel
| TOp.Coerce, [e], [tgty;srcty] -> GenCoerce cenv cgbuf eenv (e, tgty, m, srcty) sequel
| TOp.Reraise, [], [rtnty] -> GenReraise cenv cgbuf eenv (rtnty, m) sequel
Expand Down Expand Up @@ -3274,11 +3274,11 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel =

// Generate ldtoken instruction for "methodhandleof(fun (a, b, c) -> obj.M(a, b, c))"
// where M is an IL method.
| Expr.Lambda (_, _, _, _, Expr.Op (TOp.ILCall (_, _, valu, _, _, _, _, ilMethRef, actualTypeInst, actualMethInst, _), _, _, _), _, _) ->
| Expr.Lambda (_, _, _, _, Expr.Op (TOp.ILCall (_, _, isStruct, _, _, _, _, ilMethRef, enclTypeInst, methInst, _), _, _, _), _, _) ->

let boxity = (if valu then AsValue else AsObject)
let boxity = (if isStruct then AsValue else AsObject)
let mkFormalParams gparams = gparams |> DropErasedTyargs |> List.mapi (fun n _gf -> mkILTyvarTy (uint16 n))
let ilGenericMethodSpec = IL.mkILMethSpec (ilMethRef, boxity, mkFormalParams actualTypeInst, mkFormalParams actualMethInst)
let ilGenericMethodSpec = IL.mkILMethSpec (ilMethRef, boxity, mkFormalParams enclTypeInst, mkFormalParams methInst)
let i = I_ldtoken (ILToken.ILMethod ilGenericMethodSpec)
CG.EmitInstr cgbuf (pop 0) (Push [g.iltyp_RuntimeMethodHandle]) i

Expand Down
32 changes: 16 additions & 16 deletions src/fsharp/Optimizer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2007,12 +2007,12 @@ and OptimizeInterfaceImpl cenv env baseValOpt (ty, overrides) =
and MakeOptimizedSystemStringConcatCall cenv env m args =
let rec optimizeArg argExpr accArgs =
match argExpr, accArgs with
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ], _), _
when IsILMethodRefSystemStringConcatArray mref ->
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, ilMethRef, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ], _), _
when IsILMethodRefSystemStringConcatArray ilMethRef ->
optimizeArgs args accArgs

| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), _, args, _), _
when IsILMethodRefSystemStringConcat mref ->
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, ilMethRef, _, _, _), _, args, _), _
when IsILMethodRefSystemStringConcat ilMethRef ->
optimizeArgs args accArgs

// String constant folding requires a bit more work as we cannot quadratically concat strings at compile time.
Expand Down Expand Up @@ -2045,8 +2045,8 @@ and MakeOptimizedSystemStringConcatCall cenv env m args =
mkStaticCall_String_Concat_Array cenv.g m arg

match expr with
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _) as op, tyargs, args, m)
when IsILMethodRefSystemStringConcat mref || IsILMethodRefSystemStringConcatArray mref ->
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, ilMethRef, _, _, _) as op, tyargs, args, m)
when IsILMethodRefSystemStringConcat ilMethRef || IsILMethodRefSystemStringConcatArray ilMethRef ->
OptimizeExprOpReductions cenv env (op, tyargs, args, m)
| _ ->
OptimizeExpr cenv env expr
Expand Down Expand Up @@ -2102,9 +2102,9 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) =
// This code hooks arr.Length. The idea is to ensure loops end up in the "same shape"as the forms of loops that the .NET JIT
// guarantees to optimize.

| TOp.ILCall (_, _, _, _, _, _, _, mref, _enclTypeArgs, _methTypeArgs, _tys), _, [arg]
when (mref.DeclaringTypeRef.Name = cenv.g.ilg.typ_Array.TypeRef.Name &&
mref.Name = "get_Length" &&
| TOp.ILCall (_, _, _, _, _, _, _, ilMethRef, _, _, _), _, [arg]
when (ilMethRef.DeclaringTypeRef.Name = cenv.g.ilg.typ_Array.TypeRef.Name &&
ilMethRef.Name = "get_Length" &&
isArray1DTy cenv.g (tyOfExpr cenv.g arg)) ->
OptimizeExpr cenv env (Expr.Op (TOp.ILAsm (i_ldlen, [cenv.g.int_ty]), [], [arg], m))

Expand All @@ -2113,11 +2113,11 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) =
| TOp.ILAsm ([], [ty]), _, [a] when typeEquiv cenv.g (tyOfExpr cenv.g a) ty -> OptimizeExpr cenv env a

// Optimize calls when concatenating strings, e.g. "1" + "2" + "3" + "4" .. etc.
| TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ]
when IsILMethodRefSystemStringConcatArray mref ->
| TOp.ILCall(_, _, _, _, _, _, _, ilMethRef, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ]
when IsILMethodRefSystemStringConcatArray ilMethRef ->
MakeOptimizedSystemStringConcatCall cenv env m args
| TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), _, args
when IsILMethodRefSystemStringConcat mref ->
| TOp.ILCall(_, _, _, _, _, _, _, ilMethRef, _, _, _), _, args
when IsILMethodRefSystemStringConcat ilMethRef ->
MakeOptimizedSystemStringConcatCall cenv env m args

| _ ->
Expand Down Expand Up @@ -2177,9 +2177,9 @@ and OptimizeExprOpFallback cenv env (op, tyargs, argsR, m) arginfos valu =
| StripUnionCaseValue (uc, info) -> UnionCaseValue(uc, info)
| _ -> valu
0, valu
| TOp.ILAsm (instrs, tys) ->
| TOp.ILAsm (instrs, retTypes) ->
min instrs.Length 1,
mkAssemblyCodeValueInfo cenv.g instrs argValues tys
mkAssemblyCodeValueInfo cenv.g instrs argValues retTypes
| TOp.Bytes bytes -> bytes.Length/10, valu
| TOp.UInt16s bytes -> bytes.Length/10, valu
| TOp.ValFieldGetAddr _
Expand All @@ -2204,7 +2204,7 @@ and OptimizeExprOpFallback cenv env (op, tyargs, argsR, m) arginfos valu =
// Indirect calls to IL code are always taken as tailcalls
let mayBeCriticalTailcall =
match op with
| TOp.ILCall (virt, _, newobj, _, _, _, _, _, _, _, _) -> not newobj && virt
| TOp.ILCall (isVirtual, _, isCtor, _, _, _, _, _, _, _, _) -> not isCtor && isVirtual
| _ -> false

let vinfo = { TotalSize=argsTSize + cost
Expand Down
28 changes: 14 additions & 14 deletions src/fsharp/PostInferenceChecks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,8 @@ and CheckExpr (cenv: cenv) (env: env) origExpr (context: PermitByRefExpr) : Limi
CheckExprs cenv env rest (mkArgsForAppliedExpr true rest f)

// Allow base calls to IL methods
| Expr.Op (TOp.ILCall (virt, _, _, _, _, _, _, mref, enclTypeArgs, methTypeArgs, tys), tyargs, (Expr.Val (baseVal, _, _) :: rest), m)
when not virt && baseVal.BaseOrThisInfo = BaseVal ->
| Expr.Op (TOp.ILCall (isVirtual, _, _, _, _, _, _, ilMethRef, enclTypeInst, methInst, retTypes), tyargs, (Expr.Val (baseVal, _, _) :: rest), m)
when not isVirtual && baseVal.BaseOrThisInfo = BaseVal ->

// Disallow calls to abstract base methods on IL types.
match tryTcrefOfAppTy g baseVal.Type with
Expand All @@ -1080,16 +1080,16 @@ and CheckExpr (cenv: cenv) (env: env) origExpr (context: PermitByRefExpr) : Limi
// We believe this may be fragile in some situations, since we are using the Abstract IL code to compare
// type equality, and it would be much better to remove any F# dependency on that implementation of IL type
// equality. It would be better to make this check in tc.fs when we have the Abstract IL metadata for the method to hand.
let mdef = resolveILMethodRef tcref.ILTyconRawMetadata mref
let mdef = resolveILMethodRef tcref.ILTyconRawMetadata ilMethRef
if mdef.IsAbstract then
errorR(Error(FSComp.SR.tcCannotCallAbstractBaseMember(mdef.Name), m))
with _ -> () // defensive coding
| _ -> ()

CheckTypeInstNoByrefs cenv env m tyargs
CheckTypeInstNoByrefs cenv env m enclTypeArgs
CheckTypeInstNoByrefs cenv env m methTypeArgs
CheckTypeInstNoByrefs cenv env m tys
CheckTypeInstNoByrefs cenv env m enclTypeInst
CheckTypeInstNoByrefs cenv env m methInst
CheckTypeInstNoByrefs cenv env m retTypes
CheckValRef cenv env baseVal m PermitByRefExpr.No
CheckExprsPermitByRefLike cenv env rest

Expand Down Expand Up @@ -1233,21 +1233,21 @@ and CheckExprOp cenv env (op, tyargs, args, m) context expr =
let limit2 = CheckExpr cenv env e3 context // result of a try/catch can be a byref if in a position where the overall expression is can be a byref
CombineTwoLimits limit1 limit2

| TOp.ILCall (_, _, _, _, _, _, _, methRef, enclTypeArgs, methTypeArgs, tys), _, _ ->
| TOp.ILCall (_, _, _, _, _, _, _, ilMethRef, enclTypeInst, methInst, retTypes), _, _ ->
CheckTypeInstNoByrefs cenv env m tyargs
CheckTypeInstNoByrefs cenv env m enclTypeArgs
CheckTypeInstNoByrefs cenv env m methTypeArgs
CheckTypeInstNoInnerByrefs cenv env m tys // permit byref returns
CheckTypeInstNoByrefs cenv env m enclTypeInst
CheckTypeInstNoByrefs cenv env m methInst
CheckTypeInstNoInnerByrefs cenv env m retTypes // permit byref returns

let hasReceiver =
(methRef.CallingConv.IsInstance || methRef.CallingConv.IsInstanceExplicit) &&
(ilMethRef.CallingConv.IsInstance || ilMethRef.CallingConv.IsInstanceExplicit) &&
not args.IsEmpty

let returnTy = tyOfExpr g expr

let argContexts = List.init args.Length (fun _ -> PermitByRefExpr.Yes)

match tys with
match retTypes with
| [ty] when context.PermitOnlyReturnable && isByrefLikeTy g m ty ->
if hasReceiver then
CheckCallWithReceiver cenv env m returnTy args argContexts context
Expand Down Expand Up @@ -1413,8 +1413,8 @@ and CheckExprOp cenv env (op, tyargs, args, m) context expr =
// Recursively check in same context, e.g. if at PermitOnlyReturnable the obj arg must also be returnable
CheckExpr cenv env obj context

| TOp.ILAsm (instrs, tys), _, _ ->
CheckTypeInstNoInnerByrefs cenv env m tys
| TOp.ILAsm (instrs, retTypes), _, _ ->
CheckTypeInstNoInnerByrefs cenv env m retTypes
CheckTypeInstNoByrefs cenv env m tyargs
match instrs, args with
// Write a .NET instance field
Expand Down
18 changes: 9 additions & 9 deletions src/fsharp/QuotationTranslator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP.
let raiseExpr = mkCallRaise g m (tyOfExpr g expr) arg1
ConvExpr cenv env raiseExpr

| TOp.ILAsm (_il, _), _, _ ->
| TOp.ILAsm (_, _), _, _ ->
wfail(Error(FSComp.SR.crefQuotationsCantContainInlineIL(), m))

| TOp.ExnConstr tcref, _, args ->
Expand Down Expand Up @@ -670,16 +670,16 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP.
| FSharpForLoopUp -> QP.mkForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body)
| _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainDescendingForLoops(), m))

| TOp.ILCall (_, _, _, isNewObj, valUseFlags, isProp, _, ilMethRef, enclTypeArgs, methTypeArgs, _tys), [], callArgs ->
| TOp.ILCall (_, _, _, isCtor, valUseFlag, isProperty, _, ilMethRef, enclTypeInst, methInst, _), [], callArgs ->
let parentTyconR = ConvILTypeRefUnadjusted cenv m ilMethRef.DeclaringTypeRef
let isNewObj = isNewObj || (match valUseFlags with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false)
let isNewObj = isCtor || (match valUseFlag with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false)
let methArgTypesR = List.map (ConvILType cenv env m) ilMethRef.ArgTypes
let methRetTypeR = ConvILType cenv env m ilMethRef.ReturnType
let methName = ilMethRef.Name
let isPropGet = isProp && methName.StartsWithOrdinal("get_")
let isPropSet = isProp && methName.StartsWithOrdinal("set_")
let tyargs = (enclTypeArgs@methTypeArgs)
ConvObjectModelCall cenv env m (isPropGet, isPropSet, isNewObj, parentTyconR, [], methArgTypesR, methRetTypeR, methName, tyargs, methTypeArgs.Length, [], [], [callArgs])
let isPropGet = isProperty && methName.StartsWithOrdinal("get_")
let isPropSet = isProperty && methName.StartsWithOrdinal("set_")
let tyargs = (enclTypeInst@methInst)
ConvObjectModelCall cenv env m (isPropGet, isPropSet, isNewObj, parentTyconR, [], methArgTypesR, methRetTypeR, methName, tyargs, methInst.Length, [], [], [callArgs])

| TOp.TryFinally _, [_resty], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)] ->
QP.mkTryFinally(ConvExpr cenv env e1, ConvExpr cenv env e2)
Expand Down Expand Up @@ -828,8 +828,8 @@ and ConvLValueExprCore cenv env expr =
| TOp.LValueOp (LAddrOf _, vref), _, _ -> ConvValRef false cenv env m vref []
| TOp.ValFieldGetAddr (rfref, _), _, _ -> ConvClassOrRecdFieldGet cenv env m rfref tyargs args
| TOp.UnionCaseFieldGetAddr (ucref, n, _), [e], _ -> ConvUnionFieldGet cenv env m ucref n tyargs e
| TOp.ILAsm ([ I_ldflda(fspec) ], _rtys), _, _ -> ConvLdfld cenv env m fspec tyargs args
| TOp.ILAsm ([ I_ldsflda(fspec) ], _rtys), _, _ -> ConvLdfld cenv env m fspec tyargs args
| TOp.ILAsm ([ I_ldflda(fspec) ], _), _, _ -> ConvLdfld cenv env m fspec tyargs args
| TOp.ILAsm ([ I_ldsflda(fspec) ], _), _, _ -> ConvLdfld cenv env m fspec tyargs args
| TOp.ILAsm (([ I_ldelema(_ro, _isNativePtr, shape, _tyarg) ] ), _), (arr :: idxs), [elemty] ->
match shape.Rank, idxs with
| 1, [idx1] -> ConvExpr cenv env (mkCallArrayGet cenv.g m elemty arr idx1)
Expand Down
8 changes: 4 additions & 4 deletions src/fsharp/TypeChecker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ let ReportImplicitlyIgnoredBoolExpression denv m ty expr =
UnitTypeExpectedWithEquality (denv, ty, m)
else
UnitTypeExpectedWithEquality (denv, ty, m)
| Expr.Op (TOp.ILCall (_, _, _, _, _, _, _, methodRef, _, _, _), _, Expr.Val (vf, _, _) :: _, _) :: _ when methodRef.Name.StartsWithOrdinal("get_") ->
UnitTypeExpectedWithPossiblePropertySetter (denv, ty, vf.DisplayName, PrettyNaming.ChopPropertyName(methodRef.Name), m)
| Expr.Op (TOp.ILCall (_, _, _, _, _, _, _, ilMethRef, _, _, _), _, Expr.Val (vf, _, _) :: _, _) :: _ when ilMethRef.Name.StartsWithOrdinal("get_") ->
UnitTypeExpectedWithPossiblePropertySetter (denv, ty, vf.DisplayName, PrettyNaming.ChopPropertyName(ilMethRef.Name), m)
| Expr.Val (vf, _, _) :: _ ->
UnitTypeExpectedWithPossibleAssignment (denv, ty, vf.IsMutable, vf.DisplayName, m)
| _ -> UnitTypeExpectedWithEquality (denv, ty, m)
Expand Down Expand Up @@ -11838,8 +11838,8 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) =
AttribNamedArg(nm, argty, isProp, mkAttribExpr callerArgExpr))

match expr with
| Expr.Op (TOp.ILCall (_, _, valu, _, _, _, _, ilMethRef, [], [], _rtys), [], args, m) ->
if valu then error (Error(FSComp.SR.tcCustomAttributeMustBeReferenceType(), m))
| Expr.Op (TOp.ILCall (_, _, isStruct, _, _, _, _, ilMethRef, [], [], _), [], args, m) ->
if isStruct then error (Error(FSComp.SR.tcCustomAttributeMustBeReferenceType(), m))
if args.Length <> ilMethRef.ArgTypes.Length then error (Error(FSComp.SR.tcCustomAttributeArgumentMismatch(), m))
let args = args |> List.map mkAttribExpr
Attrib(tcref, ILAttrib ilMethRef, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTgts, m)
Expand Down
Loading