Skip to content

Commit

Permalink
Merge branch 'master' into bayprocpath
Browse files Browse the repository at this point in the history
  • Loading branch information
ike709 authored Oct 4, 2024
2 parents c1267a7 + 7bc0324 commit 522e9ff
Show file tree
Hide file tree
Showing 98 changed files with 341 additions and 375 deletions.
Binary file modified .github/assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/assets/screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// COMPILE ERROR
// COMPILE ERROR OD2701
#pragma InvalidReturnType error

/datum/foo

/datum/proc/meep() as /atom
return /atom

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD2207
#pragma SuspiciousMatrixCall error

/proc/RunTest()
Expand Down
12 changes: 12 additions & 0 deletions Content.Tests/DMProject/Tests/Builtins/rgb.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/proc/RunTest()
ASSERT(rgb(255, 255, 255) =="#ffffff")
ASSERT(rgb(255, 0, 0) == "#ff0000" )
ASSERT(rgb(0, 0, 255) == "#0000ff")
ASSERT(rgb(18, 245, 230) == "#12f5e6")
ASSERT(rgb(18, 245, 230, 128) == "#12f5e680")
ASSERT(rgb(202, 96, 219, space=COLORSPACE_RGB) == "#ca60db")
ASSERT(rgb(291.70734, 56.164383, 85.882355, space=COLORSPACE_HSV) == "#ca60db")
ASSERT(rgb(291.70734, 63.07692, 61.764706, space=COLORSPACE_HSL) == "#ca60db" )

ASSERT(rgb(291.70734, 63.07692, 61.764706, 128, COLORSPACE_HSL) == "#ca60db80" )
//ASSERT(rgb(291.70734, 68.2215, 55.423534, space=COLORSPACE_HCY) == "#ca60db") // TODO Support HCY
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Call/PointlessParentCall.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD2205
#pragma PointlessParentCall error

/datum/proc/foo()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD2210

#pragma PointlessPositionalArgument error

Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Const/Const_CycleRefences.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404

var/const/A = B
var/const/B = C
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Dereference/DatumIndex.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD2304
#pragma InvalidIndexOperation error

// Indexing a datum (e.g. datum["foo"]) is not valid in BYOND 515.1641+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404

/proc/RunTest()
var/resource = 'file_doesnt_exist.txt'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404

/obj
var/ele = 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/obj
proc/elefn()
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Indent/inconsistent.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0001

/proc/RunTest()
var/test1 = 1
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Indent/inner_root_in_proc.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0001

/obj/proc/p()
return 5 + 3
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/List/readonly1.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0501

//# issue 702

Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/List/readonly2.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0501

//# issue 702

Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/List/readonly3.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0501

//# issue 702

Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/List/readonly4.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0501

//# issue 702

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD3204

#pragma AmbiguousInOrder error

Expand Down
15 changes: 15 additions & 0 deletions Content.Tests/DMProject/Tests/Operators/Overloads/list_ops.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/datum/overloader
var/list/L = list()

/datum/overloader/proc/operator[](var/idx)
return L[idx]

/datum/overloader/proc/operator[]=(var/idx, var/d)
L[idx] = d

/proc/RunTest()
var/datum/overloader/O = new()
O["A"] = 5
O["A"]++

ASSERT(O["A"] == 6)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/RunTest()
var/a = 0
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Operators/is_decl_lvalue.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/RunTest()
(var/a = 1) = 2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD2209
#pragma PointlessScopeOperator error

/datum/proc/foo()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//COMPILE ERROR
//COMPILE ERROR OD1201

#pragma WarningDirective error

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//COMPILE ERROR
//COMPILE ERROR OD0010

#define DAMN(what...,the...,hockeysticks...) world << list(##what)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0001

#define A 1
#define B 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404

#define A 5\
#define B 6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0012
#define TEST(a,b) a+b

/proc/main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0014

//# issue 389

Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Preprocessor/multi_arg.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0001

//# issue 14

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD1200

/proc/RunTest()
/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD1200

//# issue 465

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404
// issue OD#846

#define TEST(x) x
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Procs/Arglist/input.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/_input(...)
return input(arglist(args))
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Procs/Arglist/istype.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/_istype(...)
return istype(arglist(args))
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Procs/Arglist/locate.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/_locate(...)
return locate(arglist(args))
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Procs/Arglist/newlist.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/_newlist(...)
return newlist(arglist(args))
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Procs/var_decl_param.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0001

/proc/novar(a, b)
return a + b
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD2800

#pragma UnimplementedAccess error

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD2800

#pragma UnimplementedAccess error

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0100
/proc/RunTest()
var/list/L = list(1,2,3)
nameof(L[2]) // nameof() isn't valid on a list index
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//COMPILE ERROR
//COMPILE ERROR OD3100
//Test that our pragma for this is working.
#pragma EmptyBlock error
/proc/RunTest()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//COMPILE ERROR
//COMPILE ERROR OD3101
//Test that our pragma for this is working.
#pragma EmptyProc error

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404
//# issue 360

bad:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404
//# issue 360

/proc/RunTest()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0404
//# issue 360

/proc/RunTest()
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Statements/EmptyBlock.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD3100
#pragma EmptyBlock error

/proc/RunTest()
Expand Down
4 changes: 2 additions & 2 deletions Content.Tests/DMProject/Tests/Statements/For/nest_in.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/RunTest()
var/list/l1 = list(1,2,3)
var/list/l2 = list(4,5,6)
var/out = 0
for (var/i in l1 in l2)
logi += i
out += i
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/RunTest()
var/c = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/RunTest()
var/i
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//COMPILE ERROR
//COMPILE ERROR OD3201
//test to make sure SuspiciousSwitchCase is working

#pragma SuspiciousSwitchCase error
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0012

/proc/RunTest()
var/a = 0 && var/b = 1
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Stdlib/addtext1.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0013

//# issue 663

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/RunTest()
var/test1 = "["["a""b"]"]" // 'expected end of embedded statement' from inner interpolation
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/proc/RunTest()
var/test1 = "["a""b"]" // expected end of embedded expression
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0012

/proc/RunTest()
var/test1 = "[;]" // expected an expression
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Text/ProperImproper.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0001

/proc/RunTest()
var/InvalidProper = "Example \proper"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0501

//# issue 535

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0501

/obj
/var/const/a = 5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0501

/proc/RunTest()
var/const/a = 7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0500

/proc/somered()
return 127
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0500

/proc/somered()
return 127
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0011

/atom/var/a = 5
/atom/const/a = 4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COMPILE ERROR
// COMPILE ERROR OD0406

/turf/C = 4
/datum/var/const/C = 5
Expand Down
Loading

0 comments on commit 522e9ff

Please sign in to comment.