Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
765591c
Sync to origin/release/656
hgoldstein Jan 10, 2025
a0ed331
Merge branch 'upstream' into merge
hgoldstein Jan 10, 2025
ba71ff1
Explicitly cast size_t to uint64_t in buffer_readbits / buffer_writebits
hgoldstein Jan 10, 2025
aaaeae5
Sync to upstream/release/657
vrn-sn Jan 17, 2025
790dc17
Merge branch 'master' into merge
vrn-sn Jan 17, 2025
c6e2b53
Merge branch 'upstream' into merge
vrn-sn Jan 17, 2025
76e0958
Include <algorithm> and <vector> in IrUtils.cpp
vrn-sn Jan 17, 2025
23241e2
Sync to upstream/release/658
ayoungbloodrbx Jan 24, 2025
6167275
Merge branch 'master' into merge
ayoungbloodrbx Jan 24, 2025
ec5643d
Merge branch 'upstream' into merge
ayoungbloodrbx Jan 24, 2025
768a3a2
Remove duplicate flag
ayoungbloodrbx Jan 24, 2025
c31654d
Move duplicate flag back
ayoungbloodrbx Jan 24, 2025
072195b
Merge branch 'master' into merge
menarulalam Feb 1, 2025
5f0bd2f
Sync to upstream/release/659
menarulalam Feb 1, 2025
a699a21
Merge branch 'upstream' into merge
menarulalam Feb 1, 2025
a3630ef
Merge branch 'upstream' into merge
menarulalam Feb 1, 2025
df60533
Sync to upstream/release/659
menarulalam Feb 1, 2025
7199da8
Sync to upstream/release/660
Feb 7, 2025
fd9b8b0
Merge branch 'master' into merge
Feb 7, 2025
198c1f7
Merge branch 'upstream' into merge
Feb 7, 2025
6b30374
Cast types appropriately to fix compilation error.
Feb 7, 2025
d17d70d
Merge branch 'upstream' into merge
Feb 7, 2025
c9a4113
Explicitly enable FFlags in interpolated string Transpiler tests
Feb 8, 2025
587cf13
Sync to upstream/release/661
Vighnesh-V Feb 14, 2025
aab18f3
Merge branch 'master' into merge
Vighnesh-V Feb 14, 2025
1d001c4
Merge branch 'upstream' into merge
Vighnesh-V Feb 14, 2025
69afd59
Correctly apply unsigned casting patch to merge branch
Vighnesh-V Feb 14, 2025
279e15a
Sync to upstream/release/662
vegorov-rbx Feb 21, 2025
1c3720a
Merge branch 'master' into merge
vegorov-rbx Feb 21, 2025
4717228
Merge branch 'upstream' into merge
vegorov-rbx Feb 21, 2025
6a8da81
Merge fix
vegorov-rbx Feb 21, 2025
b6ca2a0
Sync to upstream/release/663
aatxe Feb 28, 2025
4b3b32a
Merge branch 'master' into merge
aatxe Feb 28, 2025
f43ebc2
Merge branch 'upstream' into merge
aatxe Feb 28, 2025
7568957
Sync to upstream/release/664
vegorov-rbx Mar 7, 2025
a0fad72
Merge branch 'master' into merge
vegorov-rbx Mar 7, 2025
23bc546
Merge branch 'upstream' into merge
vegorov-rbx Mar 7, 2025
af20253
Sync to upstream/release/665
hgoldstein Mar 14, 2025
df92b6c
Merge branch 'master' into merge
hgoldstein Mar 14, 2025
de3f3d2
Merge branch 'upstream' into merge
hgoldstein Mar 14, 2025
2eefa3f
Sync to upstream/release/666
vrn-sn Mar 21, 2025
a371d16
Merge branch 'master' into merge
vrn-sn Mar 21, 2025
716f524
Merge branch 'upstream' into merge
vrn-sn Mar 21, 2025
d4c2c64
Sync to upstream/release/667
ayoungbloodrbx Mar 28, 2025
9ae5f37
Merge branch 'master' into merge
ayoungbloodrbx Mar 28, 2025
08f07a1
Merge branch 'upstream' into merge
ayoungbloodrbx Mar 28, 2025
d9e8ded
Sync to upstream/release/668
Apr 4, 2025
f85407b
Merge branch 'master' into merge
Apr 4, 2025
6e90f90
Merge branch 'upstream' into merge
Apr 4, 2025
d2969f0
Disable failing tests until fixes have been found.
Apr 4, 2025
7a6b561
Sync to upstream/release/669
menarulalam Apr 11, 2025
c3f6c48
Merge branch 'master' into merge
menarulalam Apr 11, 2025
567876e
Merge branch 'upstream' into merge
menarulalam Apr 11, 2025
afaceca
Add missing MIT License header
vrn-sn Apr 11, 2025
8f61efb
Make RequireNavigator depend on Config (hacky, will improve later)
vrn-sn Apr 12, 2025
217c14d
Sync to upstream/release/670
Vighnesh-V Apr 18, 2025
3d1ac20
Merge branch 'master' into merge
Vighnesh-V Apr 18, 2025
2f6fb98
Merge branch 'upstream' into merge
Vighnesh-V Apr 18, 2025
500f8d4
update test cases to use NonReentrantGeneralization2
Vighnesh-V Apr 18, 2025
2b7a89d
Sync to upstream/release/671
andyfriesen Apr 25, 2025
e9ef63d
Merge branch 'master' into merge
andyfriesen Apr 25, 2025
1b78172
Merge branch 'upstream' into merge
andyfriesen Apr 25, 2025
18b36c1
Delete .clang-tidy
andyfriesen Apr 25, 2025
3adf258
Sync to upstream/release/672
aatxe May 2, 2025
7d27130
Merge branch 'master' into merge
aatxe May 2, 2025
27a8fd0
Merge branch 'upstream' into merge
aatxe May 2, 2025
335ec70
Sync to upstream/release/673
andyfriesen May 9, 2025
0e65d3f
Merge branch 'master' into merge
andyfriesen May 9, 2025
209ae16
Merge branch 'upstream' into merge
andyfriesen May 9, 2025
7975c23
Sync to upstream/release/674
hgoldstein May 16, 2025
514848a
Merge branch 'master' into merge
hgoldstein May 16, 2025
bd532d1
Merge branch 'upstream' into merge
hgoldstein May 16, 2025
aecc30f
Disable non-reentrant generalization in 'fuzz_propagate_normalization…
hgoldstein May 16, 2025
74fac86
Just disable 'fuzz_propagate_normalization_failures' for now
hgoldstein May 16, 2025
2d961d6
Also disable 'fuzz_limit_function_intersection_complexity', for now
hgoldstein May 16, 2025
f85750a
Sync to upstream/release/675
vrn-sn May 22, 2025
93b10c9
Merge branch 'master' into merge
vrn-sn May 22, 2025
ce8c20f
Merge branch 'upstream' into merge
vrn-sn May 22, 2025
1e15ce5
Update eager generalization flags in tests
vrn-sn May 22, 2025
42fc566
Bump extremely_large_table timeout (2.0 -> 3.0)
vrn-sn May 22, 2025
73ba7ec
Disable failing tests (for now)
hgoldstein May 27, 2025
de3da78
Sync to upstream/release/676
ayoungbloodrbx May 30, 2025
41f0b4b
Merge branch 'master' into merge
ayoungbloodrbx May 30, 2025
907b3a5
Merge branch 'upstream' into merge
ayoungbloodrbx May 30, 2025
4622415
Sync to upstream/release/677
vegorov-rbx Jun 6, 2025
e14c3d6
Merge branch 'master' into merge
vegorov-rbx Jun 6, 2025
d98241b
Merge branch 'upstream' into merge
vegorov-rbx Jun 6, 2025
1234321
Sync to upstream/release/678
andyfriesen Jun 13, 2025
6c272ce
Merge branch 'master' into merge
andyfriesen Jun 13, 2025
2a98788
Merge branch 'upstream' into merge
andyfriesen Jun 13, 2025
3efc353
Sync to upstream/release/679
menarulalam Jun 20, 2025
ff2963b
Merge branch 'master' into merge
menarulalam Jun 20, 2025
cc4f26a
Merge branch 'upstream' into merge
menarulalam Jun 20, 2025
ff810a7
Sync to upstream/release/680
Vighnesh-V Jun 27, 2025
12f8e01
Merge branch 'master' into merge
Vighnesh-V Jun 27, 2025
5cc182b
Merge branch 'upstream' into merge
Vighnesh-V Jun 27, 2025
03d68a5
Bump refinements_table_intersection_limits timeout to 1.0s
Vighnesh-V Jun 27, 2025
f108876
Sync to upstream/release/681
Vighnesh-V Jul 4, 2025
2f9bb78
Merge branch 'master' into merge
Vighnesh-V Jul 4, 2025
cda3cb0
Merge branch 'upstream' into merge
Vighnesh-V Jul 4, 2025
9a18552
Sync to upstream/release/682
hgoldstein Jul 11, 2025
3abf08d
Merge branch 'master' into merge
hgoldstein Jul 11, 2025
d1a16e3
Merge branch 'upstream' into merge
hgoldstein Jul 11, 2025
565cbdf
Sync to upstream/release/683
vrn-sn Jul 18, 2025
b88e624
Merge branch 'master' into merge
vrn-sn Jul 18, 2025
3b4a304
Merge branch 'upstream' into merge
vrn-sn Jul 18, 2025
d2f47d4
Sync to upstream/release/684
ayoungbloodrbx Jul 25, 2025
9c0cab0
Merge branch 'master' into merge
ayoungbloodrbx Jul 25, 2025
b057e0c
Merge branch 'upstream' into merge
ayoungbloodrbx Jul 25, 2025
00f9139
Fix test
ayoungbloodrbx Jul 25, 2025
7c31f03
Fix other test timeout
ayoungbloodrbx Jul 25, 2025
6e3303a
Sync to upstream/release/685
vrn-sn Aug 1, 2025
b24f503
Merge branch 'master' into merge
vrn-sn Aug 1, 2025
d591270
Merge branch 'upstream' into merge
vrn-sn Aug 1, 2025
79e8398
Sync to upstream/release/686
Vighnesh-V Aug 8, 2025
100ff15
Merge branch 'master' into merge
Vighnesh-V Aug 8, 2025
b08ba83
Merge branch 'upstream' into merge
Vighnesh-V Aug 8, 2025
122e876
Sync to upstream/release/687
vegorov-rbx Aug 15, 2025
0b3882f
Merge branch 'master' into merge
vegorov-rbx Aug 15, 2025
208f3a2
Merge branch 'upstream' into merge
vegorov-rbx Aug 15, 2025
12657f2
Increase the test timeout
vegorov-rbx Aug 15, 2025
b7a8ceb
Sync to upstream/release/688
aatxe Aug 22, 2025
b607072
Merge branch 'master' into merge
aatxe Aug 22, 2025
be269b2
Merge branch 'upstream' into merge
aatxe Aug 22, 2025
4e6525e
Sync to upstream/release/689
andyfriesen Aug 29, 2025
89fcdd1
Merge branch 'master' into merge
andyfriesen Aug 29, 2025
8100bef
Merge branch 'upstream' into merge
andyfriesen Aug 29, 2025
bd16b21
Disable this warning for now.
andyfriesen Aug 29, 2025
b418b3b
Typo.
andyfriesen Aug 29, 2025
721ad74
Fix a test.
andyfriesen Aug 29, 2025
da7d391
Double this timeout because GitHub is apparently running our tests on…
andyfriesen Aug 29, 2025
2221dd4
Sync to upstream/release/690
hgoldstein Sep 5, 2025
8dea2a3
Merge branch 'master' into merge
hgoldstein Sep 5, 2025
7fa2dbc
Merge branch 'upstream' into merge
hgoldstein Sep 5, 2025
73882c8
Sync to upstream/release/691
menarulalam Sep 12, 2025
e2b2bbb
Merge branch 'master' into merge
menarulalam Sep 13, 2025
42404ad
Merge branch 'upstream' into merge
menarulalam Sep 13, 2025
b3dd867
Disabled test due to stackoverflow, added ticket to investigate
menarulalam Sep 15, 2025
5a25edc
Sync to upstream/release/692
vrn-sn Sep 19, 2025
738b9ff
Merge branch 'master' into merge
vrn-sn Sep 19, 2025
be839ff
Merge branch 'upstream' into merge
vrn-sn Sep 19, 2025
1dd2409
Temporarily disable txnlog_checks_for_occurrence_before_self_binding_…
vrn-sn Sep 19, 2025
d4bce08
Sync to upstream/release/693
hgoldstein Sep 26, 2025
9dbc601
Merge branch 'master' into merge
hgoldstein Sep 26, 2025
25e35a9
Merge branch 'upstream' into merge
hgoldstein Sep 26, 2025
52bd853
Bump time limit for subtyping_should_cache_pairs_in_seen_set
hgoldstein Sep 26, 2025
6f35da3
Bump time limit for Signal_exerpt
hgoldstein Sep 26, 2025
453eeac
Sync to upstream/release/694
vegorov-rbx Oct 3, 2025
fb044aa
Merge branch 'master' into merge
vegorov-rbx Oct 3, 2025
694bd14
Merge branch 'upstream' into merge
vegorov-rbx Oct 3, 2025
68caf6b
Sync to upstream/release/695
aatxe Oct 10, 2025
f1bf48e
Merge branch 'master' into merge
aatxe Oct 11, 2025
08e7209
Merge branch 'upstream' into merge
aatxe Oct 11, 2025
c710640
fix conformance test suite
aatxe Oct 11, 2025
ae6f617
Sync to upstream/release/696
andyfriesen Oct 17, 2025
52317ce
Merge branch 'master' into merge
andyfriesen Oct 17, 2025
efdf464
Merge branch 'upstream' into merge
andyfriesen Oct 17, 2025
7d184ab
Sync to upstream/release/697
hgoldstein Oct 24, 2025
0e66629
Merge branch 'master' into merge
hgoldstein Oct 24, 2025
63f05f5
Merge branch 'upstream' into merge
hgoldstein Oct 24, 2025
2efcb44
Explicitly cast to PULONG_PTR
hgoldstein Oct 24, 2025
1d725f9
Explicitly cast uintptr_t to int in Fixture
hgoldstein Oct 24, 2025
4874123
Sync to upstream/release/698
vrn-sn Oct 30, 2025
e21caaf
Merge branch 'master' into merge
vrn-sn Oct 30, 2025
076d1c3
Merge branch 'upstream' into merge
vrn-sn Oct 30, 2025
b5e57b8
Sync to upstream/release/699
hgoldstein Nov 7, 2025
8afcef3
Merge branch 'master' into merge
hgoldstein Nov 7, 2025
9f8cc16
Merge branch 'upstream' into merge
hgoldstein Nov 7, 2025
62598dc
Put $(COMMON_TARGET) after dependents in Makefile
hgoldstein Nov 7, 2025
8b48b1d
Sync to upstream/release/700
SPY Nov 14, 2025
7c69247
Merge branch 'master' into merge
SPY Nov 14, 2025
d317aba
Merge branch 'upstream' into merge
SPY Nov 14, 2025
908c42a
Fix web build
SPY Nov 14, 2025
3d39af8
Sync to upstream/release/701
vegorov-rbx Nov 21, 2025
9369881
Merge branch 'master' into merge
vegorov-rbx Nov 21, 2025
db6f681
Merge branch 'upstream' into merge
vegorov-rbx Nov 21, 2025
1174333
Disable flaky test
vegorov-rbx Nov 21, 2025
bdb958e
Sync to upstream/release/702
andyfriesen Dec 2, 2025
2294037
Merge branch 'master' into merge
andyfriesen Dec 2, 2025
017ca39
Merge branch 'upstream' into merge
andyfriesen Dec 2, 2025
217d754
Sync to upstream/release/703
hgoldstein Dec 12, 2025
dc0bf78
Merge branch 'master' into merge
hgoldstein Dec 12, 2025
dddd94a
Merge branch 'upstream' into merge
hgoldstein Dec 12, 2025
03715ed
Missing license notice in new files.
hgoldstein Dec 12, 2025
341c21b
Add guard for checking other targets in IrLowering test.
hgoldstein Dec 12, 2025
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
1 change: 0 additions & 1 deletion Analysis/include/Luau/BuiltinTypeFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ struct BuiltinTypeFunctions

TypeFunction ltFunc;
TypeFunction leFunc;
TypeFunction eqFunc;

TypeFunction refineFunc;
TypeFunction singletonFunc;
Expand Down
12 changes: 12 additions & 0 deletions Analysis/include/Luau/ConstraintGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ struct InferencePack
}
};

struct Checkpoint
{
size_t offset = 0;
};

struct ConstraintGenerator
{
// A list of all the scopes in the module. This vector holds ownership of the
Expand Down Expand Up @@ -290,6 +295,13 @@ struct ConstraintGenerator
);

InferencePack checkPack(const ScopePtr& scope, AstExprCall* call);
InferencePack checkExprCall(
const ScopePtr& scope,
AstExprCall* call,
TypeId fnType,
Checkpoint funcBeginCheckpoint,
Checkpoint funcEndCheckpoint
);

/**
* Checks an expression that is expected to evaluate to one type.
Expand Down
5 changes: 5 additions & 0 deletions Analysis/include/Luau/FileResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ struct ModuleInfo

struct RequireAlias
{
explicit RequireAlias(std::string alias)
: alias(std::move(alias))
{
}

std::string alias; // Unprefixed alias name (no leading `@`).
std::vector<std::string> tags = {};
};
Expand Down
116 changes: 116 additions & 0 deletions Analysis/include/Luau/IterativeTypeVisitor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
#pragma once

#include "Luau/Type.h"
#include "Luau/TypePack.h"
#include "Luau/Set.h"

#include <string>

namespace Luau
{

struct IterativeTypeVisitor
{
using SeenSet = Set<const void*>;

// We avoid Luau::Variant here because we can move the tag bit and make this struct 64 bits shorter.
struct WorkItem
{
WorkItem(TypeId ty, int32_t parent);
WorkItem(TypePackId tp, int32_t parent);

const TypeId* asType() const;
const TypePackId* asTypePack() const;

bool operator==(TypeId ty) const;
bool operator==(TypePackId tp) const;

private:
// TypeId if isType, else TypePackId
const void* t;
bool isType;

public:
// -1 indicates no parent
int32_t parent;
};

explicit IterativeTypeVisitor(std::string visitorName, bool skipBoundTypes);
explicit IterativeTypeVisitor(std::string visitorName, bool visitOnce, bool skipBoundTypes);
explicit IterativeTypeVisitor(std::string visitorName, SeenSet seen, bool visitOnce, bool skipBoundTypes);

IterativeTypeVisitor(const IterativeTypeVisitor&) = delete;
IterativeTypeVisitor& operator=(const IterativeTypeVisitor&) = delete;

virtual ~IterativeTypeVisitor() = default;

virtual void cycle(TypeId);
virtual void cycle(TypePackId);

virtual bool visit(TypeId ty);
virtual bool visit(TypeId ty, const BoundType& btv);
virtual bool visit(TypeId ty, const FreeType& ftv);
virtual bool visit(TypeId ty, const GenericType& gtv);
virtual bool visit(TypeId ty, const ErrorType& etv);
virtual bool visit(TypeId ty, const PrimitiveType& ptv);
virtual bool visit(TypeId ty, const FunctionType& ftv);
virtual bool visit(TypeId ty, const TableType& ttv);
virtual bool visit(TypeId ty, const MetatableType& mtv);
virtual bool visit(TypeId ty, const ExternType& etv);
virtual bool visit(TypeId ty, const AnyType& atv);
virtual bool visit(TypeId ty, const NoRefineType& nrt);
virtual bool visit(TypeId ty, const UnknownType& utv);
virtual bool visit(TypeId ty, const NeverType& ntv);
virtual bool visit(TypeId ty, const UnionType& utv);
virtual bool visit(TypeId ty, const IntersectionType& itv);
virtual bool visit(TypeId ty, const BlockedType& btv);
virtual bool visit(TypeId ty, const PendingExpansionType& petv);
virtual bool visit(TypeId ty, const SingletonType& stv);
virtual bool visit(TypeId ty, const NegationType& ntv);
virtual bool visit(TypeId ty, const TypeFunctionInstanceType& tfit);

virtual bool visit(TypePackId tp);
virtual bool visit(TypePackId tp, const BoundTypePack& btp);
virtual bool visit(TypePackId tp, const FreeTypePack& ftp);
virtual bool visit(TypePackId tp, const GenericTypePack& gtp);
virtual bool visit(TypePackId tp, const ErrorTypePack& etp);
virtual bool visit(TypePackId tp, const TypePack& pack);
virtual bool visit(TypePackId tp, const VariadicTypePack& vtp);
virtual bool visit(TypePackId tp, const BlockedTypePack& btp);
virtual bool visit(TypePackId tp, const TypeFunctionInstanceTypePack& tfitp);

void run(TypeId ty);
void run(TypePackId tp);

protected:
/// Add this type (or pack) to the queue of things to traverse. Does not
/// immediately process the thing! You cannot use this to effect in-order
/// traversal.
void traverse(TypeId ty);
void traverse(TypePackId tp);

private:
void process(TypeId ty);
void process(TypePackId tp);

bool hasSeen(const void* tv);
void unsee(const void* tv);

template<typename TID>
bool isCyclic(TID ty) const;

void processWorkQueue();

SeenSet seen{nullptr};

std::vector<WorkItem> workQueue;
int32_t parentCursor = -1;
uint32_t workCursor = 0;

const std::string visitorName;
bool skipBoundTypes = false;
bool visitOnce = true;
};

} // namespace Luau
3 changes: 1 addition & 2 deletions Analysis/include/Luau/Normalize.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,9 @@ class Normalizer

std::optional<TypePackId> intersectionOfTypePacks(TypePackId here, TypePackId there);

// Move to private with LuauNormalizerStepwiseFuel
private:
std::optional<TypePackId> intersectionOfTypePacks_INTERNAL(TypePackId here, TypePackId there);

private:
// ------- Cached TypeIds
TypeId unionType(TypeId here, TypeId there);
TypeId intersectionType(TypeId here, TypeId there);
Expand Down
5 changes: 3 additions & 2 deletions Analysis/include/Luau/OverloadResolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ using IncompatibilityReason = Variant<SubtypingReasonings, ErrorVec>;
*/
struct SelectedOverload
{
/**
/**
* An unambiguous overload, if one can be selected. This is _not_ necessarily
* an overload that is valid for the argument pack provided. For example:
*
Expand Down Expand Up @@ -302,7 +302,8 @@ struct SolveResult
// Helper utility, presently used for binary operator type functions.
//
// Given a function and a set of arguments, select a suitable overload.
SolveResult solveFunctionCall(
// Clip with FFlag::LuauBuiltinTypeFunctionsUseNewOverloadResolution
SolveResult solveFunctionCall_DEPRECATED(
NotNull<TypeArena> arena,
NotNull<BuiltinTypes> builtinTypes,
NotNull<Normalizer> normalizer,
Expand Down
2 changes: 1 addition & 1 deletion Analysis/include/Luau/Set.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Set
class const_iterator;
using iterator = const_iterator;

Set(const T& empty_key)
explicit Set(const T& empty_key)
: mapping{empty_key}
{
}
Expand Down
1 change: 0 additions & 1 deletion Analysis/include/Luau/Subtyping.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ struct Subtyping
const SingletonType* superSingleton,
NotNull<Scope> scope
);
SubtypingResult isCovariantWith(SubtypingEnvironment& env, const TableType* subTable, const TableType* superTable, NotNull<Scope> scope);
SubtypingResult isCovariantWith(
SubtypingEnvironment& env,
const TableType* subTable,
Expand Down
5 changes: 3 additions & 2 deletions Analysis/include/Luau/TypeChecker2.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
#include "Luau/Subtyping.h"
#include "Luau/Type.h"
#include "Luau/TypeFwd.h"
#include "Luau/TypeOrPack.h"
#include "Luau/TypeUtils.h"

LUAU_FASTFLAG(LuauBetterTypeMismatchErrors)

namespace Luau
{

Expand Down Expand Up @@ -44,7 +45,7 @@ struct Reasonings
// sort the reasons here to achieve a stable error
// stringification.
std::sort(reasons.begin(), reasons.end());
std::string allReasons = "\nthis is because ";
std::string allReasons = (FFlag::LuauBetterTypeMismatchErrors && reasons.size() < 2) ? "\n" : "\nthis is because ";
for (const std::string& reason : reasons)
{
if (reasons.size() > 1)
Expand Down
7 changes: 1 addition & 6 deletions Analysis/src/AstJsonEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#include <math.h>

LUAU_FASTFLAG(LuauAutocompleteAttributes)

namespace Luau
{

Expand Down Expand Up @@ -1167,10 +1165,7 @@ struct AstJsonEncoder : public AstVisitor
"AstAttr",
[&]()
{
if (FFlag::LuauAutocompleteAttributes)
write("name", node->name);
else
write("name", node->type);
write("name", node->name);
}
);
}
Expand Down
16 changes: 6 additions & 10 deletions Analysis/src/AutocompleteCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ LUAU_FASTINT(LuauTypeInferIterationLimit)
LUAU_FASTINT(LuauTypeInferRecursionLimit)
LUAU_FASTFLAGVARIABLE(DebugLuauMagicVariableNames)
LUAU_FASTFLAGVARIABLE(LuauDoNotSuggestGenericsInAnonFuncs)
LUAU_FASTFLAG(LuauAutocompleteAttributes)
LUAU_FASTFLAGVARIABLE(LuauAutocompleteSingletonsInIndexer)

static constexpr std::array<std::string_view, 12> kStatementStartingKeywords =
Expand Down Expand Up @@ -2216,17 +2215,14 @@ AutocompleteResult autocomplete_(
}
else if (AstExprFunction* func = node->as<AstExprFunction>())
{
if (FFlag::LuauAutocompleteAttributes)
for (AstAttr* attr : func->attributes)
{
for (AstAttr* attr : func->attributes)
if (attr->location.begin <= position && position <= attr->location.end && attr->type == AstAttr::Type::Unknown)
{
if (attr->location.begin <= position && position <= attr->location.end && attr->type == AstAttr::Type::Unknown)
{
AutocompleteEntryMap ret;
for (const auto& attr : kKnownAttributes)
ret[attr.c_str()] = {AutocompleteEntryKind::Keyword};
return {std::move(ret), std::move(ancestry), AutocompleteContext::Keyword};
}
AutocompleteEntryMap ret;
for (const auto& attr : kKnownAttributes)
ret[attr.c_str()] = {AutocompleteEntryKind::Keyword};
return {std::move(ret), std::move(ancestry), AutocompleteContext::Keyword};
}
}
}
Expand Down
Loading