Skip to content

Commit 040bd42

Browse files
committed
Merge branch 'development' of https://github.com/fdorg/flashdevelop into development
2 parents 648b068 + 251eaad commit 040bd42

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

External/Plugins/AS3Context/AbcConverter.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,17 @@ public static void Convert(ContentParser parser, PathModel path, IASContext cont
129129
type.Flags = FlagType.Class;
130130
conflicts.Add(type.Name, type.QualifiedName);
131131

132-
if (instance.flags == TraitMember.Function)
132+
if ((instance.flags & TraitFlag.Interface) > 0)
133133
type.Flags |= FlagType.Interface;
134+
else
135+
{
136+
if ((instance.flags & TraitFlag.Final) > 0)
137+
type.Flags |= FlagType.Final;
138+
139+
if ((instance.flags & TraitFlag.Sealed) == 0)
140+
type.Flags |= FlagType.Dynamic;
141+
142+
}
134143

135144
thisDocs = GetDocs(model.Package);
136145
if (thisDocs != null)

External/Tools/SwfOp/Data/Abc.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public enum TraitMember: byte
6262
HasProtectedNS = 0x08
6363
}
6464

65+
[Flags]
6566
public enum Attribute: byte
6667
{
6768
Final = 0x01, // 1=final, 0=virtual
@@ -70,11 +71,13 @@ public enum Attribute: byte
7071
Public = 0x08 // 1=add public namespace
7172
}
7273

73-
public enum ClassFlag: byte
74+
[Flags]
75+
public enum TraitFlag : byte
7476
{
7577
Sealed = 0x01,
7678
Final = 0x02,
77-
Interface = 0x04
79+
Interface = 0x04,
80+
HasProtectedNS = 0x08
7881
}
7982

8083
public enum Op : byte
@@ -454,7 +457,7 @@ public class Traits
454457
public MethodInfo init;
455458
public Traits itraits;
456459
public QName baseName;
457-
public TraitMember flags;
460+
public TraitFlag flags;
458461
public Namespace protectedNs;
459462
public QName[] interfaces;
460463
public Dictionary<QName, MemberInfo> names;
@@ -838,8 +841,8 @@ private void parseInstanceInfos(BinaryReader br)
838841
instances[i] = t;
839842
t.name = (QName)names[readU32(br)];
840843
t.baseName = (QName)names[readU32(br)];
841-
t.flags = (TraitMember)br.ReadByte();
842-
if ((t.flags & TraitMember.HasProtectedNS) > 0)
844+
t.flags = (TraitFlag)br.ReadByte();
845+
if ((t.flags & TraitFlag.HasProtectedNS) > 0)
843846
t.protectedNs = (Namespace)namespaces[readU32(br)];
844847

845848
int interface_count = readU32(br);

FlashDevelop/Bin/Debug/SwfOp.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)